Heth resigned from the U.S. Army in 1861 to become colonel of the 45th Virginia. After service in West Virginia in 1861, he was promoted to brigadier general in January 1862. He served in Kentucky in 1862 before he was transferred to the Army of Northern Virginia in February 1863. He led a division at the Battle of Chancellorsville in May 1863, after which he was confirmed as a major general. He led troops into the Battle of Gettysburg, during which he was wounded, but remained on the front. In August 1864, Heth led his command into the second Battle of Ream's Station, Virginia. During the Richmond-Petersburg campaign, he commanded the Confederate forces against Union Gen. Winfield S. Hancock at the Battle of Boydton Plan Road, in October 1864. In the last days, as Union forces converged on Petersburg, Heth's division tried to hold back the Union advance at the Battle of Sutherland's Station, Virginia.