Robert Milroy received his first military training at a young age while studying at Captain Partridge’s Academy, known as Norwich University, in 1843. He received degrees of Bachelor of Arts and Master of Military Science. From 1846 to 1847, he served as a captain of the 1st Indiana Volunteers. He started studying law after his brief service, was admitted to the bar, and served at the Constitutional Convention of 1850. He continued to practice law up until the outbreak of the Civil War.
Once the Civil War began, he was made a colonel of the 9th Indiana Infantry, which he led in the western Virginia Campaign of General George B. McClellan. For his service, he was promoted to brigadier general on September 3, 1861. He commanded the Cheat Mountain district after his promotion, and participated in the Shenandoah Valley Campaign of 1862 against Confederate General Thomas “Stonewall” Jackson. He then commanded a brigade of the Army of Virginia under General John Pope at the Battle of Second Manassas. Milroy commanded forces at the Battle of McDowell and on November 29, 1862 he was promoted to the rank of Major General. During the battle, he was able to surprise the forces of “Stonewall” Jackson, and had initial success, but was unable to completely defeat the Confederate general. From February until June, Milroy commanded the 2nd Division of the VIII corps. During the Battle of Second Winchester, Milroy was defeated after he decided not to withdrawal from Winchester, thinking that the fortification the town offered could withstand a Confederate attack. Unfortunately, Milroy was overwhelmed by the 2nd Corps of the Army of Northern Virginia, led by Confederate General Richard Ewell. Although Milroy and much of his staff escaped, Confederate forces captured 3,400 of his men, as well as all of his artillery and supply wagons. He was brought up before a court of inquiry, but was not found guilty of any major wrong-doing. He was inactive for a length of time until he was transferred to the Western Theatre. He served under General George Henry Thomas, recruiting soldiers for his army, and briefly commanded troops during the Nashville Campaign. He resigned from the military on July 26, 1865.