Harris was promoted to colonel and assumed command of the regiment on April 2, 1863. He led the regiment at the Battle of Chancellorsville and the Battle of Gettysburg. He assumed command of Brigadier General Carnot Posey's brigade after Posey was mortally wounded at the Battle of Bristoe Station. Harris was promoted to brigadier general on January 20, 1864. His brigade was assigned to Major General Richard H. Anderson's division, then Major General William Mahone's division in III Corps of the Army of Northern Virginia. Harris's brigade delivered a powerful counterattack in the "Mule Shoe" salient at the Battle of Spotsylvania. He performed distinguished service during the Siege of Petersburg. At the Battle of Globe Tavern, August 21, 1864, over half of Harris's brigade were casualties. In late 1864 and early 1865, Harris's brigade fought along the Weldon Railroad. He again was especially distinguished at the Battles of Fort Gregg and Whitworth at the end of the siege. In March 1865, he commanded the inner defenses of Richmond, Virginia.