He led it during the Gettysburg Campaign, where the brigade participated in the attacks on Culp's Hill. For his actions Walker was given the nickname "Stonewall Jim" by his troops. He was badly wounded at the Battle of Spotsylvania Court House in 1864 and sent home to recuperate. After the death of Brig. Gen. John Pegram during the Petersburg Campaign, Walker was assigned command of the division. He led it until the surrender at Appomattox.