He served in the 3rd U.S. Infantry Regiment on the frontier in Wisconsin and Maine. In 1838 he transferred to the 8th US Infantry Regiment and served on the Canada–US border. In 1844, he fought in Florida against the Seminoles where he was appointed brevet major for meritorious service. During the Mexican–American War, he served with the 8th Infantry at Vera Cruz and at the Battle of Molino del Rey, where he was wounded. For this service he was appointed a brevet colonel.