"Oh we'll hang Jeff Davis from a sour apple tree" (and similar) is a variant of the American folk song "John Brown's Body" that was sung by the United States military, Unionist civilians, and freedmen during and after the American Civil War.
[1][2][3][4] The phrase and associated imagery became relevant to the post-war legal issues surrounding the potential prosecution of former Confederate politicians and officers; the lyric was sometimes referenced in political cartoons and artworks of the time, and in political debates continuing well into the post-Reconstruction era.
[9] In 1880, a U.S. Army veteran claimed credit for first singing the lyric in spring 1862 in Virginia, having taken inspiration from a prior song about a "sick monkey in a sour apple tree.
I can still remember, like it was yesterday, playing 'We'll Hang Jeff Davis on a Sour Apple Tree.
"[12] Richard Wright's 1938 novella Big Boy Leaves Home references a white-supremacist variant: "We'll hang ever nigger t a sour apple tree.