The song posted by Dick Greenhaus is printed in "The Folk Songs of North America," Alan Lomax, p. 99, with music. In the Traditional Folk Index (cufresno), John Galusha is quoted as telling the Warners' that the song was written by a James McCoy. He said it concerned Capt. Dennis Barnes, killed in the Battle of the Wilderness (possibly the May 1864 battle).
Seemingly, the song has not been collected from other sources.