The remainder of the corps served in the Petersburg Campaign. When Ord assumed command of the Army of the James from Butler on January 1, 1865, John Gibbon took command of the corps and led it ably. The corps took part in the defeat of Lee at Hatcher's Run in February and were involved in the assaults of Fort Gregg and Fort Whitworth during the fall of Petersburg on April 2 The corps was engaged during the skirmish at Appomattox that occurred just prior to Lee's surrender. During the Appomattox campaign, an Independent Division of troops that had served in the Shenandoah Valley was added to the first and third divisions. The corps remained in Virginia until August, when it was disbanded.