The Treaty of Guadalupe Hidalgo, which brought an official end to the Mexican-American War (1846–48), was signed on February 2, 1848, at Guadalupe Hidalgo, a city to which the Mexican government had fled with the advance of U.S. forces.

With the defeat of its army and the fall of the capital, Mexico City, in September 1847, the Mexican government surrendered to the United States and entered into negotiations to end the war. The peace talks were negotiated by Nicholas Trist, chief clerk of the State Department, who had accompanied General Winfield Scott as a diplomat and President Polk's representative. Trist and General Scott, after two previous unsuccessful attempts to negotiate a treaty with President Santa Anna, determined that the only way to deal with Mexico was as a conquered enemy. Nicholas Trist negotiated with a special commission representing the collapsed government led by Don Bernardo Couto, Don Miguel Atristain, and Don Luis Gonzaga Cuevas.

President Polk had recalled Trist under the belief that negotiations would be carried out with a Mexican delegation in Washington. In the six weeks it took to deliver Polk's message, Trist had received word that the Mexican government had named its special commission to negotiate. Trist determined that Washington did not understand the situation in Mexico and negotiated the peace treaty in defiance of the President.

In a December 4, 1847, letter to his wife, he wrote, "Knowing it to be the very last chance and impressed with the dreadful consequences to our country which cannot fail to attend the loss of that chance, I decided today at noon to attempt to make a treaty; the decision is altogether my own."

See the Teaching With Documents Lesson Plan: The Treaty of Guadalupe Hidalgo.