In 1861 Milroy mustered in as a colonel in the 9th Indiana Infantry. He participated in the campaign in western Virginia and consequently received a promotion to brigadier general and then to major general. Milroy served in the Shenandoah Valley campaign of 1862 before he took command of a brigade during the Battle of First Manassas. In June 1863 he was outmaneuvered at the Battle of Second Winchester and was unable to reach Gettysburg due to heavy losses. He held no further field command during the war.