Davis was hanged by Union forces in Pulaski, Tennessee, on November 27, 1863. As he was trundled along to the hanging site atop his own coffin, Union soldiers alongside the bumpy wagon road shouted out their entreaties for his cooperation, lest they have to watch the grim execution. Supposedly the officer in charge of the execution was discomfited by Davis' youth and calm demeanor and had trouble carrying out his orders. Davis is alleged to have said to him, "Officer, I did my duty. Now, you do yours."
Accounts of Davis' death appeared in writings by Union soldiers, who witnessed the execution, and by a journalist from the Cincinnati Daily Commercial. Bearing his fate bravely, Davis apparently touched upon the sympathies of all observers, including his captors. The reporter recorded the scene thus:
All nature seemed to be in mourning, and many warm hearts, loyal and true, but more that were not, melted into sympathy. Four companies of the 111th Illinois and two companies of the 7th Iowa were drawn up, forming a hollow square with fixed bayonets, with the gallows in the center of it. Hundreds and thousands were the spectators; the soldiery paraded about the guard; the citizens, gazing with scowls from their dwellings. The Provost Marshal took off the prisoner's hat, for his hands were tied behind him, and then Chaplain Young, of the 81st Ohio, addressed a throne of mercy in behalf of his soul. And that prayer – it was long and fervently prayed that if a reprieve was not to be given on earth, that a higher, better, lasting one might be given in Heaven, where wars come not. Then he implored God's blessing upon our whole country – that sweet peace might soon return again – that the time when war should no longer be waged might come even speedily; and every breathing heart in that vast multitude said, 'Amen!'"
After a white hood was tied over Davis' head, the trap door was sprung at 10:30 a.m. Union soldiers turned away as Davis writhed in death agony for three minutes. "He stood it like a man," one Union soldier noted in his diary the following day. "He never paled a bit but stood it like a hero." That night, the Daily Commercial reported, "evergreens were planted, and now sigh in the wild wintery winds o'er his grave, while flowers culled by fair hands, were strewn upon it."
Davis wrote a letter to his mother before his execution, "Dear mother. O how painful it is to write you! I have got to die to-morrow --- to be hanged by the Federals. Mother, do not grieve for me. I must bid you good-bye forevermore. Mother, I do not fear to die. Give my love to all." There was a postscript for his father, too. "Father, you can send after my remains if you want to do so. They will be at Pulaski, Tenn. I will leave some things with the hotel keeper for you."