At the beginning of the war, Governor Charles Smith Olden and Hexamer offered his battery to the federal government. At first it was refused, but it was added to the volunteer service after a four-month delay, being mustered into service on August 12, 1861. Thereafter it was known as Battery A, 1st Battery New Jersey Light Artillery. The battery served at first with First New Jersey Brigade of Brig. Gen. Philip Kearny in the Peninsula Campaign, where it was part of VI Corps in the Army of the Potomac. Hexamer’s battery next saw action in the Antietam Campaign. It served with VI Corps at the Battle of Crampton’s Gap and the Battle of Antietam, assigned to the division of Maj. Gen. Henry W. Slocum. The battery also served at the Battle of Fredericksburg with the same division under Brig. Gen. William T. H. Brooks. Hexamer was ill and missed the Second Battle of Fredericksburg and the Battle of Salem Church, both fought by VI Corps. The battery was commanded by Lt Augustine N. Parsons. Battery A covered the Union force’s crossing of the Rappahannock River on May 3, 1863. The guns accompanied the federal advance toward Salem Church and supported an attack on the brigade of Brig. Gen. Cadmus Wilcox near the church. When VI Corps was forced onto the defensive, Parsons’ guns supported the infantry line until their ammunition ran low. The battery also supported the federal retreat across the river on May 4. Parsons remained in command for the Battle of Gettysburg, in which Battery A was assigned to the Reserve Artillery. The battery was sent to the front on July 3, 1863 to resist Pickett's Charge. Its guns supported the Philadelphia Brigade to their left front at the crisis of the attack. Hexamer returned to command in the fall of 1863. His battery served in the Reserve Artillery in the Bristoe Campaign and the Battle of Mine Run. In 1864, Hexamer’s battery continued in the Reserve Artillery in the Overland Campaign until the Battle of Cold Harbor, when it was assigned to VI Corps. The battery supported the failed attacks of the Union army at Cold Harbor. The Battery remained with VI Corps in the early stages of the Siege of Petersburg. Hexamer was mustered out of the service on August 18, 1864. Parsons succeeded him in command.