Born in Boston, Brooks was sponsored in his early military career by the Marquis de Lafayette who was a friend of his mother's family. Nominated by Lafayette, Brooks entered West Point on July 1, 1831 and graduated in 1835. He was appointed second lieutenant and assigned to the 2ndUnited StatesArtillery Regiment. Just months after graduating, Brooks saw combat when his regiment was deployed to Florida during the Second Seminole War. As part of a small force under the command of Brig. Gen. Duncan Lamont Clinch, Brooks participated in the Battle of Withlacoochee against the Seminole during which he was commended by Clinch for his bravery. Following this action, Brooks served as Clinch's adjutant and was brevetted first lieutenant for his service. Brooks served in the Mexican–American War from 1846 to 1848, achieving the official rank of captain and the brevet rank of lieutenant colonel. During the years leading up to the Civil War, he was in command of the light battery school at Fort Leavenworth in Kansas.
Civil War
In February 1861, with hostilities increasing and the prospect of Civil War imminent, Capt. Brooks's battery was transferred to Fort McHenry in Baltimore. He played an important role in readying the Fort for combat. In April, he was sent to Fort Pickens which was, at that time, threatened by Confederate forces. In November 1861, the Trent Affair increased tensions between the United States and Great Britain and Brooks was transferred to Fort Jefferson in the Florida Keys to prepare for possible attack by the British. During 1861, Brooks was promoted twice, attaining the rank of lieutenant colonel by the end of the year. In 1862, Brooks became a superintendent of the recruiting service and was transferred to Ohio. On August 1, 1863, he was promoted to colonel and placed in command of the 4th U.S. Artillery Regiment. The regiment was assigned to the defenses of Washington, D.C. Brooks played a significant role in planning the overall defenses of the capitol. For meritorious service during the war, he was brevetted brigadier general, U.S. Army, by nomination of President of the United StatesAndrew Johnson on June 30, 1866 and confirmation by the U.S. Senate on July 25, 1866, to rank from March 13, 1865.
Post-Civil War career
Brooks remained in command of the 4th U.S. Artillery Regiment after the Civil War. From 1872 to 1877 he commanded the Presidio of San Francisco. In 1877, Brooks retired after 46 years of active service in the army.