During the Overland Campaign of 1864, Hampton's cavalry fought at Todd's Tavern during The Wilderness, and patrolled the left flank of the Confederate position at Spotsylvania Court House, during which time J.E.B. Stuart was killed at the Yellow Tavern. Hampton escorted Lee's withdrawal to Richmond, fighting at North Anna and Haw's Shop before being detached from Lee's army to deal with Maj. Gen. Philip Sheridan's cavalry destroying railroad in central Virginia. He distinguished himself further with a successful strategic victory at the bloody Battle of Trevilian Station, the war's largest all cavalry battle. After his return to Richmond, he fought at Nance's Shop, and was given command of the Cavalry Corps on August 11, 1864. For the rest of the war, Hampton lost no cavalry battles. In September, Hampton conducted what became known as the "Beefsteak Raid", where his troopers captured over 2400 head of cattle and more than 300 prisoners behind enemy lines.