Promoted to divisional command, Brooks led the 1st Division of VI Corps at Fredericksburg and Chancellorsville. In June 1863, he was promoted to major general of volunteers, but this was later revoked. This demotion has been blamed on Brooks's being involved in intrigues by VI Corps commanders against Maj. Gen. Ambrose Burnside after Fredericksburg. During the Gettysburg Campaign, he commanded the Department of the Monongahela, with his headquarters in Pittsburgh. He supervised the construction of a series of earthworks to protect the city from a possible Confederate raid. Returning to field duty in the late spring of 1864, Brooks commanded the 1st Division of XVIII Corps at Cold Harbor and Petersburg. In July 1864, he was forced to resign from the Army due to poor health and returned home.