While the early battles of the Mexican-American War were won by a all-professional army under General Zachary Taylor, it was Winfield Scott who took Mexico City on September 14, 1847. His conquest of Mexico was accomplished with a mix of professional and volunteer units, including the finest field artillery in the world at the time. In addition, he accomplished this against what on paper looked like impossible odds, and in fact was a difficult campaign.
His base was at Vera Cruz, and to travel to Mexico City he had no chance with his limited manpower of occupying the country. Instead he cut his army loose from a fixed line of supply, and only held a few major outposts between the coast and Mexico City. By his aggressive tactics and the unusual freedom of initiative by his subordinates he mentally outmanuevered Santa Anna, who also had political opponents in his own army command. When he entered the Mexican capital Scott only had about 6,000 troops left.
After he took Mexico City Scott, who had been a general officer since the War of 1812, only held Vera Cruz, the capital and four other intermediate points. He could not actually conquer Mexico, but once he was reinforced to 24,000 troops there was no way the Mexican government and army could drive him out, and they were forced to accept the independance from Mexico and unification with the US of Texas, and the loss of California and New Mexico. In return Scott left Mexico and the US paid the country $15 million for the ceded territories, and assumed some three million dollars in debts from Mexico to US citizens in those areas.
Ironically enough, President Polk's administration had offered Mexico $25 million in exchange for the same areas before the war, and Santa Anna had refused.
United States General Winfield Scott successfully led the campaign to capture Mexico City during the Mexican-American War.