Mexican–American War
Polk and Scott had never liked one another, and their distrust deepened after Polk became president, partly due to Scott's affiliation with the Whig Party. Polk came into office with two primary foreign policy goals: the acquisition of Oregon Country, which was under joint American and British rule, and the acquisition of Alta California, a Mexican province. The United States nearly went to war with Britain over Oregon, but the two powers ultimately agreed to partition Oregon Country at the 49th parallel north. The Mexican–American War broke out in April 1846 after U.S. forces under the command of Brigadier General Zachary Taylor clashed with Mexican forces north of the Rio Grande in a region claimed by both Mexico and Texas. Polk, Secretary of War William L. Marcy, and Scott agreed on a strategy in which the U.S. would capture Northern Mexico and then pursue a favorable peace settlement. While Taylor led the army in Northern Mexico, Scott presided over the expansion of the army, ensuring that new soldiers were properly supplied and organized.
Taylor won several victories against the Mexican army, but Polk eventually concluded that merely occupying Northern Mexico would not compel Mexico to surrender. Scott drew up an invasion plan that would begin with a naval assault on the Gulf port of Veracruz and end with the capture of Mexico City. With Congress unwilling to establish the rank of lieutenant general for Democratic Senator Thomas Hart Benton, Polk reluctantly turned to Scott to command the invasion. Among those who joined the campaign were several officers who would later distinguish themselves in the American Civil War, including Major Joseph E. Johnston, Captain Robert E. Lee, and Lieutenants Ulysses S. Grant, George B. McClellan, George G. Meade, and P. G. T. Beauregard. While Scott prepared the invasion, Taylor inflicted what the U.S. characterized as a crushing defeat on the army of Mexican President Antonio López de Santa Anna at the Battle of Buena Vista. In the encounter known in Mexico as the Battle of La Angostura, Santa Anna brought U.S. forces to near collapse, capturing cannons and flags, and returned to Mexico City, leaving U.S. forces on the field. Santa Anna left to put down a minor insurrection, and recruited a new army.
Biographer John Eisenhower said the invasion of Mexico through Veracruz was "up to that time the most ambitious amphibious expedition in human history." The operation commenced on March 9, 1847, with the Siege of Veracruz, a joint army-navy operation led by Scott and Commodore David Conner. After safely landing his 12,000-man army, Scott encircled Veracruz and began bombarding it; the Mexican garrison surrendered on March 27. Seeking to avoid a rising by the divided Mexicans against the American invasion, Scott placed a priority on winning the cooperation of the Catholic Church. Among other initiatives designed to show respect for church property and officials, he ordered his men to salute Catholic priests on the streets of Veracruz. After securing supplies and wagons, Scott's army began the march toward Xalapa, a city on the way to Mexico City. Meanwhile, Polk dispatched Nicholas Trist, Secretary of State James Buchanan's chief clerk, to negotiate a peace treaty with Mexican leaders. Though they initially feuded, Scott and Trist eventually developed a strong working relationship.
In mid-April, Scott's force met Santa Anna's army at Cerro Gordo, near Xalapa. Santa Anna had established a solid defensive position, but he left his left flank undefended on the assumption that dense trees made the area impassable. Scott decided to attack Santa Anna's position on two fronts, sending a force led by David E. Twiggs against Santa Anna's left flank, while another force, led by Gideon Pillow, would attack Santa Anna's artillery. In the Battle of Cerro Gordo, Pillow's force was largely ineffective, but Twiggs and Colonel William S. Harney captured the key Mexican position of El Telegrafo in hand-to-hand fighting. Mexican resistance collapsed after the capture of El Telegrafo; Santa Anna escaped the battlefield and returned to Mexico City, but Scott's force captured about 3,000 Mexican soldiers. After the battle, Scott continued to press toward Mexico City, cutting him and his army off from his supply base at Veracruz.
Scott's force arrived in the Valley of Mexico in August 1847, by which time Santa Anna had formed an army of approximately 25,000 men. Because Mexico City lacked walls and was essentially indefensible, Santa Anna sought to defeat Scott in a pitched battle, choosing to mount a defense near the Churubusco River several miles south. The Battle of Contreras began on the afternoon of August 19, when the Mexican army under General Gabriel Valencia attacked and pushed back an American detachment charged with building a road. In the early morning of the following day, an American force led by General Persifor Frazer Smith surprised and decimated Valencia's army. News of the defeat at Contreras caused a panic among the rest of Santa Anna's army, and Scott immediately pressed the attack, beginning the Battle of Churubusco. Despite the strong defense by the Saint Patrick's Battalion and some other units, Scott's force quickly defeated the demoralized Mexican army. After the battle, Santa Anna negotiated a truce with Scott, and the Mexican foreign minister notified Trist that they were ready to begin negotiations to end the war.
Despite the presence of Scott's army just outside of Mexico City, the Mexican and American delegations remained far apart on terms; Mexico was only willing to yield portions of Alta California and refused to accept the Rio Grande as its northern border. While negotiations continued, Scott faced a difficult issue in the disposition of 72 members of Saint Patrick's Battalion who had deserted from the U.S. Army and were captured while fighting for Mexico. All 72 were court-martialed and sentenced to death. Under pressure from some Mexican leaders and personally feeling that the death penalty was an unjust punishment for some defendants, Scott spared 20, but the rest were executed. In early September, negotiations between Trist and the Mexican government broke down, and Scott exercised his right to end the truce. In the subsequent Battle for Mexico City, Scott launched an attack from the west of the city, capturing the critical fortress of Chapultepec on September 13. Santa Anna retreated from the city after the fall of Chapultepec, and Scott accepted the surrender of the remaining Mexican forces early on the 14th.
Unrest broke out in the days following the capture of Mexico City, but with the cooperation of civil leaders and the Catholic Church, Scott and the army restored order in the city by the end of the month. Peace negotiations between Trist and the Mexican government resumed, and Scott did all he could to support the talks, ceasing all further offensive operations. As military commander of Mexico City, Scott was held in high esteem by Mexican civil and American authorities alike, primarily owing to the fairness with which he treated Mexican citizens. In November 1847, Trist received orders to return to Washington. Scott received orders to continue the military campaign against Mexico; Polk had grown frustrated at the slow pace of negotiations. With the support of Scott and Mexican president Manuel de la Peña y Peña, Trist defied his orders and continued the negotiations. Trist and the Mexican negotiators concluded the Treaty of Guadalupe Hidalgo on February 2, 1848; it was ratified by the U.S. Senate the following month. In late 1847, Scott arrested Pillow and two other officers after they wrote letters to American newspapers that were critical of Scott. In response, Polk ordered the release of the three officers and removed Scott from command.
Upon founding the Aztec Club of 1847, a military society of officers who served in Mexico during the war, Scott was elected as one of only two honorary members of the organization.