 In 1846, at the beginning of the Mexican–American War, Roberts was reappointed a first lieutenant, Mounted Rifles, in the Regular Army.He was promoted to captain in 1847, and saw action at Veracruz, Cerro Gordo, Contreras, Churubusco, and the capture of Mexico City, Matamoros and the Galajara pass.At Churubusco, he was brevetted major for leading an advance party of stormers.