[58] Polk, wary of Taylor's growing popularity, divided his forces, sending some troops (including Grant's unit) to form a new army under Major General Winfield Scott.[59] Traveling by sea, Scott's army landed at Veracruz and advanced toward Mexico City.[60] The army met the Mexican forces at the battles of Molino del Rey and Chapultepec outside Mexico City.[61] For his bravery at Molino del Rey, Grant was brevetted first lieutenant on September 30.[62] At San Cosmé, Grant directed his men to drag a disassembled howitzer into a church steeple, then reassembled it and bombarded nearby Mexican troops.[61] His bravery and initiative earned him his brevet promotion to captain.[63] On September 14, 1847, Scott's army marched into the city; Mexico ceded the vast territory, including California, to the U.S. on February 2, 1848.[64]
During the war, Grant established a commendable record, studied the tactics and strategies of Scott and Taylor, and emerged as a seasoned officer, writing in his memoirs that this is how he learned much about military leadership.[65] In retrospect, although he respected Scott, he identified his leadership style with Taylor's. 