The story tells of a young husband and wife and how they deal with the challenge of buying secret Christmas gifts for each other with very little money. As a sentimental story with a moral lesson about gift-giving, it has been popular for adaptation, especially for presentation at Christmas time. The plot and its twist ending are well-known, and the ending is generally considered an example of comic irony.
It was allegedly written at Pete's Tavern on Irving Place in New York City.
William Sydney Porter (September 11, 1862 – June 5, 1910), better known by his pen name O. Henry, was an American writer known primarily for his short stories, though he also wrote poetry and non-fiction. His works include "The Gift of the Magi", "The Caballero's Way", "The Duplicity of Hargraves", and "The Ransom of Red Chief", as well as the novel Cabbages and Kings. Porter's stories are known for their naturalist observations, witty narration, and surprise endings.