Concerned over the well-being of his daughter, Porter focused on writing stories while in jail. He had published here and there earlier but he was worried that his status as an inmate would hurt his reputation. After experimenting with various pseudonyms, he settled on O. Henry. He soon became one of the most popular short story writers in the United States, with over 200 to his name (most published in the ten years before his death).
The first story to carry the now-famous pen name was "Whistling Dick's Christmas Stocking," published in McClure's Magazine. When the title character wakes up on Christmas morning, the sound of workers around him reminds him of jail:
Already from the bosom of the mill came the thunder of rolling barrels of sugar, and (prison-like sounds) there was a great rattling of chains as the mules were harried with stimulant imprecations to their places by the wagon-tongues. A little vicious "dummy" engine, with a train of flat cars in tow, stewed and fumed on the plantation tap of the narrow-gauge railroad, and a toiling, hurrying, hallooing stream of workers were dimly seen in the half darkness loading the train with the weekly output of sugar. Here was a poem, an epic — nay, a tragedy — with work, the curse of the world, for its theme.