The McLane–Ocampo Treaty, formally the Treaty of Transit and Commerce, was an agreement between the United States and Mexico, signed in the port of Veracruz in Mexico on December 14, 1859, which would have sold the perpetual right of transit to the Isthmus of Tehuantepec to the U.S. for $4 million, through the Mexican ports of Tehuantepec in the south, to Coatzacoalcos in the Gulf of Mexico. All the transit would be free of any charge or duty, both for military and commercial effects and troops. It even granted the obligation of Mexican troops to assist in the enforcement of the rights permanently granted to the U.S.
Additionally, it granted rights of passage through two strings of Mexican land: one that would run through the state of Sonora from the port of Guaymas on the Gulf of California, to Nogales, on the border with Arizona; and another one from the western port of Mazatlán, in the state of Sinaloa, going through Monterrey all the way through Matamoros, Tamaulipas, south of present-day Brownsville, Texas, on the Gulf of Mexico. Mexico was also compelled to build storage facilities on either side of the Tehuantepec isthmus. All rights of passage would benefit the U.S. on a perpetual basis.
Of the $4 million for the total cost of these benefits, the U.S. would pay immediately only two million to the Mexican government, while the remaining half would stay in U.S. hands in provision for payments to American citizens suing the Mexican government for damages to their rights.
Although U.S. President James Buchanan strongly favored the arrangement, and Mexican President Benito Juárez badly needed the money to finance the war he was waging against the Conservative Party, it was never ratified by the U.S. Senate.
The fact that the treaty was not ratified by the US Senate is related to the imminent civil war in the US, and the fact that the northern, non-slavery states, that at that time were majority in the senate, were concerned that the provisions in the treaty, in particular the free transit of military effects and troops through the isthmus would benefit the soon to become Confederate States, in case of an open war between the Union and the Confederate States.
The U.S. hoped to build a railroad or canal across the isthmus to speed transport of mail and trade goods between the east and west coasts. Roads there and in Nicaragua and Panama already carried considerable traffic.
The treaty derives its name from Robert Milligan McLane, then United States ambassador to Mexico, and Liberal politician Melchor Ocampo, who negotiated the treaty in hopes the money would boost the Liberal Party's chances in the ongoing Mexican Reform War.  The treaty would also have placed Mexico under the military protection of the U.S.  and reduced or eliminated tariffs  
- Extending the Gadsden Treaty, Mexico agreed to grant the US a right "in perpetuity" to transit across the Isthmus of Tehuantepec
- Both parties agreed to protect the region's trade routes
- Mexico agreed to establish "ports of deposit" at both coasts
- Goods in transit from port to port would be subject to no tariff or duty
- Goods imported to Mexico at these ports would be subject to normal tariffs
- Mexico agreed to grant the US the right to intervene at the request of Mexico, or in emergencies without, in the case of danger to the trade routes
- Mexico agreed to grant the US the right of military transit, with due notice
- Mexico agreed to grant US citizens the right of transit across Mexico by various routes
- Both parties agreed to reciprocal and equal tariff policies
- Mexico agreed not to grant other parties similar rights