When Florida seceded he resigned from the U.S. Army to enter the Confederate service as a lieutenant-colonel. In June 1861, he received the rank of brigadier general. He was wounded at the First Battle of Manassas. Promoted to major general in October, he served in Bragg's invasion of Kentucky and won at Richmond in August 1862. He was promoted to lieutenant general in October 1862. He was put in command of the Trans-Mississippi Department in February 1864. He commanded forces in the Red River campaign. He surrendered his army in May 1865.