At the outbreak of the Civil War, Lee joined the Union Army. Lee became a major in the 7th Kansas Cavalry, in October 1861. He was promoted to colonel of the regiment and took part in Henry W. Halleck's capture of Corinth, Mississippi. Shortly after the fall of that city, Lee commanded the 2nd Brigade in the Cavalry Division of the Army of the Mississippi and participated in the battle of Corinth. On November 29, 1862, he received a promotion to brigadier general in the Volunteer Army. He continued leading cavalry brigades in the Army of the Tennessee before he was appointed Chief-of-Staff to the XIII Corps under Maj. Gen. John A. McClernand. Lee served as chief-of-staff through much of the Vicksburg campaign, serving at the battles of Port Gibson, Champion Hill and Big Black River. During the fighting at the Big Black River, Peter J. Osterhaus was wounded and Lee was chosen to take his place in command of the 9th Division, XIII Corps. Lee's first infantry command was short lived as Osterhaus was able to resume command the following day. However, the commander of the 9th Division's 1st Brigade, Theophilus T. Garrard, went on sick leave the same day and Lee assumed command his brigade just in time to lead it into action during the May 19 assault on Vicksburg. During the assault Lee was wounded in the head and turned over command of the brigade. He sat out the rest of the siege recovering from wounds until late in the summer when he returned to division command in the XIII Corps. In August 1864 he was placed in command of the Cavalry Division of the Department of the Gulf. He led the cavalry forces during Nathaniel P. Banks' Red River Campaign. In the last month of the war, he led a raid against Clinton near Baton Rouge, Louisiana, and defeated a weak Confederate force there.