In June of that year, Wagner enlisted in the state volunteer troops as
colonel of the
15th Indiana Infantry and initially served in
western Virginia. He commanded the 21st
brigade in the
Army of the Ohio during the
Battle of Shiloh in April 1862. He subsequently participated in the
Battle of Perryville and commanded the 21st brigade in the
Army of the Cumberland at the
Battle of Stones River at the end of the year. In April 1863, he was promoted to
brigadier general, backdated to November 29, 1862. Wagner commanded the 21st brigade during
Maj. Gen. William S. Rosecrans's occupation of
Chattanooga, Tennessee, in September 1863. Wagner's 21st brigade was kept as the garrison force in Chattanooga during the battle of Chickamauga. His men suffered heavy losses in an assault on
Missionary Ridge during the
Chattanooga campaign. Wagner was again active in the 1864
Atlanta campaign, commanding the
2nd Brigade, 2nd Division (Newton) in the
IV Corps, which suffered exceptionally heavy losses at the
Battle of Kennesaw Mountain, and a division during the
Franklin-Nashville campaign. His military career was ruined at the
Battle of Franklin. He diverged from the orders of his superior,
Brig. Gen. Jacob D. Cox, to withdraw his outnumbered force from an exposed forward position. Instead, he chose to stand firm and face the impending assault. Two of his brigades were routed, and running toward the primary defensive line, intermixed with the attacking Confederates. As a result, the main Union force held its fire for fear of killing friendly troops, allowing the Confederate assault column to penetrate the Union center. Federal reinforcements finally stabilized the position, but Wagner's controversial course of action drew significant criticism and questioning. As a result of the debacle, Wagner asked to be relieved of duty, citing concerns for his wife's health. Wagner was returned to Indiana to await orders. He briefly served in
St. Louis, Missouri, toward the end of the war. He was mustered out of the service in August 1865. ==Postbellum career==