With the outbreak of the Civil War, Brooks was appointed brigadier general of volunteers in September 1861. He commanded the 2nd Brigade, 2nd Division of the IV Corps in the Peninsula Campaign, and the 2nd Brigade, 2nd Division of the VI Corps at the Seven Days Battles, where he was wounded at the Battle of Savage's Station. Recovering, he resumed command of his brigade for the Maryland Campaign and led his men at Crampton's Gap, where they captured a Confederate battle flag belonging to the 16th Virginia Infantry. At the Battle of Antietam, Brooks's brigade was mainly in reserve, although under "galling fire of both artillery and sharpshooters" for 48 hours.