Montgomery returned to his regiment in Mexico in 1847‑48 and was engaged in the Battle of Cerro Gordo, April 17‑18, 1847, the capture of San Antonio after the Battle of Contreras, August 20, 1847, the Battle of Churubusco, August 20, 1847, and the Battle of Molino del Rey, September 8, 1847, where he was wounded in the assault on the Mexican works and for which he was appointed brevet lieutenant colonel. He nonetheless served in the Battle of Chapultepec on September 13, 1847 and the Battle for Mexico City, resulting in the capture of Mexico City on September 13‑14, 1847.