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 at 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. He resigned from the army on May 4, 1865.