During the Mexican–American War, Trousdale joined the Army with the rank of Colonel, and commanded the 14th U.S. Infantry. This regiment landed at Veracruz on June 13, 1847, and was placed under General Gideon Pillow's 3rd Division. Trousdale's forces linked up with Winfield Scott's forces on July 8, and began the march inland to Mexico City. Trousdale took part in the Battle of Contreras and the Battle of Churubusco on August 20, and was grazed in the shoulder while fighting in the Battle of Molino del Rey on September 8. Trousdale commanded two regiments (the 14th and 11th) and an artillery battery at the Battle of Chapultepec on September 13. During this battle, his right arm was shattered by enemy fire, though he continued fighting, and managed to lead a charge that captured an enemy cannon. For his actions at Chapultepec, Trousdale was brevetted to brigadier general by President James K. Polk on August 23, 1848.