The moral of the story is that physical possessions, however valuable they may be, are of little value in the grand scheme of things. The true unselfish love that the characters, Jim and Della, share is greater than their possessions.
O. Henry ends the story by clarifying the metaphor between the characters in the story, Della and James (or Jim), and the Biblical Magi.
"The Gift of the Magi" features O. Henry's characteristic twist ending and use of grandiloquent language.
A Mickey Mouse short film, "Mickey and Minnie's Gift of the Magi," (which is a short film in part of the film Mickey's Once Upon a Christmas), is also used as an adaptation of this story, where Mickey trades his harmonica to buy a gold chain for Minnie's watch, and Minnie trades her locket to buy a case for Mickey's harmonica.
The 1978 Sesame Street special Christmas Eve on Sesame Street also adapts the story, with Ernie trading his Rubber Duckie for a cigar box for Bert's paper clip collection, and Bert trading his paper clips for a soap dish for Ernie's Rubber Duckie. This sketch ends more happily than its source material: after Bert and Ernie exchange gifts, Mr. Hooper comes to the apartment and gives back both the Duckie and the paper clips. Bert laments that they hadn't thought to get a present for Mr. Hooper, but Mr. Hooper tells Bert he is mistaken: "I got to see that everyone got exactly what they wanted for Christmas."
The 2004 Hindi film Raincoat starring Ajay Devgan and Aishwarya Rai and directed by Rituparno Ghosh is an adaptation of this story.
The first Christmas-themed episode of the radio drama Adventures in Odyssey, originally broadcast December 19, 1987, was a tongue-in-cheek adaptation of the story called "Gifts for Madge and Guy," with Jim and Della's names changed to Guy and Madge respectively. The names Madge and Guy are a play on the word "Magi."
There was also another made-for-tv movie, a 1978 adaptation titled The Gift of Love, starring Marie Osmond as Della's character renamed Beth Atherton.
The Venezuelan sketch show Bienvenidos did a straight, serious adaptation of the story for a Christmas special.
There was also an episode of Catdog in which the story was changed to birthday gifts and a bit different (being that Cat sold his Loompha for a wrestling suit for Dog, and Dog sold his wrestling mud pit for a Loompha carrier, then trade the Loompha carrier in for a wrestling suit, much to Cat's disappointment)
There is also an episode of the Rugrats in which Phil and Lil both traded their Christmas gifts to get presents that appeased each other.
The 1977 Jim Henson Company holiday special Emmet Otter's Jug-Band Christmas is partially based off of this story.
One of the short-short stories in Steve Martin's Cruel Shoes, "The Gift of the Magi Indian Giver," involved the husband selling his shinbones to buy his wife "cuticle frames," while she sold her cuticles to buy him "shinbone polish." The ending implied that the couple enjoyed a bit of light BDSM.