At the outbreak of the Civil War Carman joined the Army at Newark, New Jersey, and was commissioned lieutenant colonel of the 7th New Jersey Volunteer Infantry on September 19, 1861. In that role he was wounded in the right arm during the Battle of Williamsburg on May 5, 1862. After recovering, Carman was appointed a colonel on July 8 of that year. At that rank, he organized and led the 13th New Jersey Volunteer Infantry. He led his regiment in the brigade of Brig. Gen. George H. Gordon in Brig. Gen. Alpheus S. Williams's 1st Division of the XII Corps at the Battle of Antietam. Carman next saw action in Brig. Gen. Thomas Ruger's brigade of the 1st division of the XII Corps. He fought at the Battle of Chancellorsville and the Battle of Gettysburg. In the latter action, he served on the right flank of the Army of the Potomac, except when Williams led the division, temporarily commanded by Ruger, to the left flank of the army on July 2, 1863. Later that month, Carman led a temporary brigade of three regiments sent to help quell the New York Draft Riots. Carman went West with the XII Corps to the relief of the Army of the Cumberland, besieged at Chattanooga, late in 1863. His regiment was transferred to the newly organized XX Corps under Maj. Gen. Joseph Hooker, serving in the 1st Division under Williams. Carman served in the Atlanta Campaign, seeing action in several battles. He led a brigade of the 1st Division during Maj. Gen. William T. Sherman's March to the Sea. In this period the XX Corps became a part of Maj. Gen. Henry W. Slocum's Army of Georgia. After Savannah, Georgia, fell to Sherman's command, Carman was ordered to Nashville on "special duty." Whether the failure of XX Corps, especially of Carman's brigade, to prevent William J. Hardee's escape from Savannah led to this transfer is open to question. His advance had been stopped by Confederate cavalry under Maj. Gen. Joseph Wheeler near Izard's Mill, and Carman had not renewed the attack. Carman was mustered out of volunteer service on March 13, 1865, having received the Brevet rank of brigadier general on March 13 of that year.
Post-war
After the war, Carman was a civil servant, serving as chief clerk of the United States Department of Agriculture in the years 1877 through 1885. He served as the historical expert for the Board created Antietam National Battlefield and later went on to assume the office of superintendent of Chickamauga-Chattanooga National Battlefield. Carman died in Washington, D.C. He is buried at the Arlington National Cemetery. Carman was survived by his second wife, Ada Salmon Carman and four of their children. A son by his first marriage and one by his second predeceased him. Carman's maps appear in Atlas of the battlefield of Antietam, edited by George W. Davis and Charles H. Ourand. Carman also wrote a study of the Maryland Campaign, which was published recently: The Maryland Campaign of September 1862: Ezra A. Carman's Definitive Study of the Union and Confederate Armies at Antietam, edited by Joseph Pierro. He also was an author of D. E. Salmon, Ezra Ayers Carman, Hubert A. Heath, and John Minto, , published in 1892. Another role was that of a genealogist for the "Carman Association." His papers can be found at the New Jersey Historical Society., the New York Public Library, and the National Archives.