[6] In early life, when stationed in New Orleans, Barnard married Jane Elizabeth Brand, of Maryland, with whom he had four children.
[7] In 1833, at the age of 18, Barnard graduated from the United States Military Academy at West Point, New York, second in a class of forty-three cadets.
[8] As one of the top graduates of his class, he was posted as a Second Lieutenant in the United States Army Corps of Engineers, embarking on a 48-year career in that branch.
[9] Barnard's first assignment after being commissioned was as an assistant to Colonel Joseph G. Totten in constructing Fort Adams in Newport, Rhode Island, from 1833 to 1834.
[10] Soon after the outbreak of the Civil War, U.S. Army commander Major General and Brevet Lieutenant General Winfield Scott, bearing in mind Barnard's success at defending his Tampico-based supply lines during the Mexican–American War, assigned then Major Barnard to the Department of Washington.
[16] When the Union Army moved into Northern Virginia on May 24, 1861, Barnard oversaw the erection of fortifications on the Arlington hills.
[14] Major General George B. McClellan assumed command of the Military Division of the Potomac, the troops around Washington, D.C., on July 23, 1861.
[18] On August 15, 1861, McClellan was appointed to the command of the Army and Department of the Potomac,[18] and Barnard became chief engineer of the Military District of Washington.
[21] Lincoln formally nominated Barnard as brigadier general on December 21, 1861, and the U.S. Senate confirmed the promotion on March 24, 1862.
[27] Soon after the close of the war, Barnard was made president of the permanent Board of Engineers for Fortifications and River and Harbor Improvements, a position which he held until his retirement from active service, in January, 1881.
[28] Barnard successfully recast the approach to coastal defenses which was required because of the obsolescence of wooden ships and muzzle loading guns.
Barnard was an original member of the Aztec Club of 1847 as well as the Military Order of the Loyal Legion of the United States.
Barnard was a co-founder of the United States National Academy of Sciences, as were several other senior officers of the U.S. Army Corps of Engineers.