On July 1, 1863, Walker was promoted to brigadier general and after the Gettysburg campaign was assigned to Major General Henry Heth's division of III Corps of the Army of Northern Virginia, initially commanding Heth's former brigade, then Brigadier General James J. Archer's brigade as well, after Archer's grievous wounding. Walker served as a brigade commander under Heth until he lost his left foot in the Battle of Spotsylvania Court House on May 10, 1864. He participated in the Battle of Bristoe Station on October 14, 1863, in the Battle of Mine Run and, after serving in the Shenandoah Valley during the winter of 1864–1864, at the Battle of the Wilderness before his wounding at Spotsylvania Court House.