He was mortally wounded as he surrendered his Union garrison in the Battle of Harpers Ferry during the American Civil War.
At the start of the Mexican–American War, he received a brevet promotion to major for his "gallant and distinguished conduct" in the defense of Fort Brown, Texas.
When the Civil War started, Miles was recalled to Washington, D.C., and briefly commanded a brigade in the division of Maj. Gen. Robert Patterson before being transferred to the army of Brig.
He was ordered by General-in-chief Henry W. Halleck to hold the important U.S. arsenal and railroad bridges until he was relieved by Union forces under Maj. Gen. George B. McClellan.
When Confederate Maj. Gen. Stonewall Jackson began to bombard the town on September 15, 1862, from the heights he had seized, Miles held a council of war with his brigade commanders and decided to surrender.
Some of his men accused him of being drunk on duty again and were so thoroughly disgusted by his inept defense that it was said to be difficult to find a man to carry him to the hospital.