Randall wrote the poem after learning that his friend Francis X. Ward, of Randallstown, Maryland, was killed by the 6th Massachusetts Militia in the Baltimore Riot of April 19, 1861. The work was first published a week later on April 26, in the New Orleans newspaper "The Sunday Delta".