John Slidell, an American envoy sent to Mexico by President James K. Polk in late 1845, was tasked with negotiating the purchase of California and settling the border dispute between Mexico and the United States following the annexation of Texas. His mission encompassed several goals: to secure a peace treaty, determine the Rio Grande as the southern border of Texas (rather than the Nueces River, as Mexico claimed), and to negotiate the purchase of the territories of New Mexico and California.
Mexico, having never recognized the independence of Texas and considering its annexation by the United States as an act of aggression, was in no mood to negotiate away additional territories. The Mexican government was politically unstable at the time, and entertaining Slidell's proposals could have been seen as a betrayal of national sovereignty, possibly leading to political suicide for those in power. Furthermore, there was a strong sense of national pride and a lingering resentment over the loss of Texas.
When Slidell arrived in Mexico, he found a government unwilling to even receive him officially. President José Joaquín de Herrera was seen as too conciliatory towards the U.S. by his political opponents, leading to his being deposed by General Mariano Paredes in December 1845. The new government refused to acknowledge Slidell as an official representative of the U.S., rejecting the proposition to sell large swathes of Mexican territory, and thus, Slidell's mission ended without success.
The failure of Slidell's mission increased tensions and contributed to the outbreak of the Mexican-American War in April 1846. The United States, under Polk's leadership, argued that it had tried to resolve the disputes diplomatically and that Mexico's refusal to engage with Slidell justified a military response. Despite Mexico's initial resistance, the war ended with the signing of the Treaty of Guadalupe Hidalgo in 1848, whereby Mexico was compelled to cede an enormous amount of territory to the U.S., including the present-day states of California, Nevada, Utah, Arizona, and New Mexico, as well as parts of Colorado, Wyoming, Kansas, and Oklahoma, in exchange for a sum of $15 million and the assumption of certain American claims against Mexico.