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.