In March 1864, the Army of the Potomac was reorganized, reducing the number of corps commanders, and subordinates down the chain of command were affected. Ayres was reduced to commanding the 4th Brigade of the 1st Division, V Corps. He led the brigade in Lt. Gen. Ulysses S. Grant's Overland Campaign of 1864. He received command of a new 2nd Division of the V Corps for the Siege of Petersburg. On August 1, 1864, he received a brevet promotion to major general for his contributions in these campaigns; he received particular commendations and brevet promotions for Weldon Railroad and Five Forks. Ayres continued to lead his division through the Appomattox Campaign and the Confederate surrender.