The following year he was engaged in the Battle of Gettysburg and then was transferred with Lt. Gen. James Longstreet's corps to the West, where he took part in the charge that destroyed the Federal right wing at Chickamauga. After the relief of McLaws following the battle of Knoxville Kershaw was given the command of the division and promoted to major general on 2 June 1864. When Longstreet returned to Virginia, he commanded a division in the battles of the Wilderness, Spotsylvania Court House, and Cold Harbor, and was engaged in the Shenandoah campaign of 1864 against Maj. Gen. Philip Sheridan. After the evacuation of Richmond, his troops formed part of Lt. Gen. Richard S. Ewell's corps, which was captured on 6 April 1865 at the Battle of Sayler's Creek.