Born in New York City, Barry was appointed to the United States Military Academy in 1834, and graduated in 1838, 17th in his class of 45 cadets.
[1] In April 1861, the War Department dispatched Captain Barry to help organize the artillery defenses at Fort Pickens, Florida, against the Rebel threat in nearby Pensacola.
During the First Battle of Bull Run, Barry's position was overrun after mistaking advancing Confederates for retreating Union forces.
[2] As chief of artillery under Maj. Gen. George B. McClellan, Barry organized ordnance for the Army of the Potomac and, during the Peninsula Campaign, later took part in the battles of Yorktown, Mechanicsville, Gaines' Mill, White Oak Swamp, and Malvern Hill.
After later supervising forts and ordnance surrounding Washington, D.C., Barry became chief of artillery under Maj. Gen. William T. Sherman, serving with him in Tennessee, the March to the Sea, and the Carolinas Campaign.