Smith was relieved of command in July due to ill health, and he was replaced by Edward O.C. Ord and later Godfrey Weitzel. Charles A. Heckman briefly commanded the corps following the wounding of General Ord during the Battle of Chaffin's Farm. John Gibbon was temporary commander of the corps in the month of September 1864. The corps occupied the line of entrenchments closest to the main Confederate line, and suffered heavy casualties in almost daily skirmishing for a month. The corps was relieved of its position by X Corps on August 26, and the corps was sent first to the Bermuda Hundred, and later to the north bank of the James River. Its first division took part in the successful attack on Fort Harrison on August 29 during the Battle of Chaffin's Farm. The corps was also engaged on October 27 in the Second Battle of Fair Oaks, fought over the same ground as the first battle in May 1862. The corps was ultimately discontinued in December 1864; as with X Corps, its white units went to join the new XXIV Corps, while its black units joined XXV Corps.