 He enlisted in the United States Army on June 6, 1845.He served in the Mexican-American War, where he was breveted for "good qualities" to the rank of second lieutenant on June 28, 1848, later made permanent January 26, 1849.He commanded a battery of artillery in the field under General Zachary Taylor, and later General Winfield Scott at the siege of Mexico City.