The United States shares a border with Mexico. The Rio Grande River forms part of the border between Texas and Mexico.
The United States and Mexico went to war in 1846 over the border. The Mexicans believed the border was the Nueces River. This border would have made Texas much smaller than it currently is. The United States believed the border was the Rio Grande River. The United States sent John Slidell to Mexico to discuss this issue with the Mexican government. When Mexico refused to meet with him to resolve the border issue, the United States moved troops into the disputed territory. Mexico, believing the troops were in their land, attacked them. This started the Mexican-American War.
In the Treaty of Guadalupe Hidalgo, Mexico agreed the border with Texas would be at the Rio Grande River. Thus, part of the border between Mexico and the United States is the Rio Grande River. Mexico also gave the United States a lot of other land, including land that makes up present-day Arizona, California, and New Mexico, extending the United States' border to the west, too, although that part of the border was created more artificially than its Rio Grande counterpart in Texas.