Final answer:
General Winfield Scott captured Mexico City, ending the Mexican War.
Step-by-step explanation:
On September 14, 1847, General Winfield Scott captured Mexico City, ending the Mexican War. After a hard-fought campaign, Scott's forces successfully took control of the city, including the iconic Chapultepec Castle. This victory marked the culmination of the U.S. invasion of Mexico and led to the signing of the Treaty of Guadalupe Hidalgo, which ceded vast territories to the United States.