After graduating he took part, as second lieutenant in the 1st U.S. Artillery, in the Mexican War.
He graduated at West Point in 1846, served as second lieutenant with the Mormon battalion in California during the Mexican War, and became a captain in 1855.
In 1836 he entered West Point, and on graduating near the head of his class he was appointed second lieutenant in the 3rd artillery regiment.
After this volley the regimental commander clutched at his leg; several soldiers fell, and a second lieutenant who was holding the flag let it fall from his hands.
From the latter he graduated in July 1828, and became by brevet a second lieutenant of infantry.