In September 1845 he went with his regiment to join the forces of General Taylor in Mexico; there he took part in the battles of Palo Alto, Resaca de la Palma and Monterey, and, after his transfer to General Scott's army, which he joined in March 1847, served at Vera Cruz, Cerro Gordo, Churubusco, Molino del Rey and at the storming of Chapultepec. He was breveted first lieutenant for gallantry at Molino del Rey and captain for gallantry at Chapultepec. In August 1848, after the close of the war, he married Julia T.
During the Mexican war he was twice severely wounded in a reconnaissance at Cerro Gordo, 1847, was engaged in the siege of Vera Cruz, the battles of Contreras, Churubusco, and Molino del Rey, the storming of Chapultepec, and the assault on the city of Mexico, and received three brevets for gallant and meritorious service.
He received the brevets of major for Cerro Gordo, lieut.- colonel for Contreras-Churubusco and colonel for Chapultepec. After the war he was employed in engineer work at Washington and Baltimore, during which time, as before the war, he resided on the great Arlington estate, near Washington, which had come to him through his wife.
Wool in Chihuahua, and under General Winfield Scott in the southern campaign; he was breveted major-general for gallantry at Cerro Gordo, where he was severely wounded, and he was again wounded at Chapultepec. In1849-1855he was a United States senator from Illinois; and in1858-1859was a senator from Minnesota.