During the Mexican-American War, he fought at the Battle of Contreras and the Battle of Churubusco, both in August 1847. While engaged at Churubusco he was again wounded, and his performance there combined with his actions at Contreras won him brevet to the rank of major on August 20. Walker then participated in the Battle of Molino del Rey in early September and was once more wounded, this time in the back. For his actions there he was made a brevet lieutenant colonel on September 8.