At the beginning of the Civil War, James Hagan organized and was elected captain of a cavalry company for the Alabama Militia, the "Mobile Dragoons," which served on guard duty along the Gulf Coast. He transferred as Major (United States) to the 1st Mississippi Cavalry Regiment on October 26, 1861. The regiment fought at the Battle of Shiloh on April 6–7, 1862. Hagan led his men in a mounted charge at the Battle of Perryville which was highly commended by his brigade commander, Brigadier General Joseph Wheeler.
Hagan was promoted to colonel of a new regiment, the 3rd Alabama Cavalry Regiment, on July 1, 1862. The regiment fought in all of the campaigns of the Army of Tennessee. In July of 1863, Hagan was assigned to command Brigade 1 of Brigadier General William T. Martin's Division of the Cavalry Corps of the Army of Tennessee, which was Major General Joseph Wheeler's old brigade. During the spring and summer of 1863, the brigade screened the left front of General Braxton Bragg's army. Wheeler recommended that Hagan be promoted to brigadier general but Bragg blocked the promotion because he said Hagan was in a state of "dissipation", a reference to drunkenness or alcoholism. Hagan had been wounded near Franklin, Tennessee in the winter of 1862 and again near Kingston, Tennessee in November 1863. In November 1863, he resigned and returned to Mobile to recover from his wounds and his disappointment from not being promoted.
This song does not have anything to do with any of that.