Kipling apparently wrote the various Barrack-Room Ballads in early 1890, about a year since he had last been in India, and three years since Flaxman's execution. Though he wrote large amounts of occasional verse, he usually added a note beneath the title giving the context of the poem. "Danny Deever" does not have any such notes, but ""Cleared"" (a topical poem on the Parnell Commission), written in the same month as "Danny Deever", does. This suggests that it was not thought by Kipling to be inspired by a specific incident, though it is quite possible that he remembered the Flaxman case.