O. Henry's stories that are often comic or sentimental tales are developed upon some contradiction or incongruity in the narrative. For instance, in "After Twenty Years" the contradiction is that the two friends who parted twenty years ago are now on opposite sides of the law. In "Gift of the Magi," each spouse sells their valued personal possession for which the other purchases a gift.
This contradiction or incongruity plays into the sentimental ending that has an ironic twist which reveals O. Henry's conviction that people are essentially good and possess an innate dignity. Using "After Twenty Years" again as an example, the one friend who has become a policeman writes his former friend a note telling him that he has not had the heart to arrest him when he recognized him as "Silky Bob," revealing his respect for their youthful friendship:
Bob: I was at the appointed place...Somehow I couldn't do it myself, so I went around and got a plain clothes man to do the job.
In a very poignant story, "The Last Leaf," Johnsy, who has been very ill says she will give up on life when the last leaf on a vine outside disappears. Since the doctor has told her friend that the only thing that can save Johnsy is to give her a reason to live, her friend Sue implores the tenant below them to help. A little curmudgeon, "Old Behrman," so loves this Johnsy that he climbs a ladder outside in a winter rain storm and paints the "last leaf" on the window outside Johnsy's bed so that she will not despair and die. His act of love gives him a fatal case of pneumonia, but she lives. This deeply sentimental ending restores the readers' faith in man in their surprise at this typical O. Henry ironic twist.