Mexican President Vicente Fox has described a US proposal to build a fence along their 3,200km (2,000 miles) border as "shameful".
The bill also includes the use of troops and police to halt migrants
He said the proposal - which Mexican officials have compared to the Berlin Wall - was a "very bad signal" from a nation of immigrants.
The US House of Representatives passed an immigration bill last week, backing the building of a 1,130-km fence.
About 10m Mexicans are believed to live in the US, some 4m of them illegally.
More than a million are arrested every year as they try to enter the US to seek work.
The controversial bill - which the US Senate is due to debate in February - also includes the use of troops and police to halt migrants, and tighter employment controls.
Mexico has condemned the proposal saying it is too focused on securing the border and does not acknowledge the "enormous contribution" that Mexican workers make to the US economy.
Speaking at an event for migrants in his home state of Guanajuato, President Fox said: "This wall is shameful."
"It's not possible that in the 21st Century we're building walls between two nations that are neighbours, between two nations that are brothers."
"When we look at their roots, the immense majority of [Americans] are migrants, migrants that have arrived from all over the world," he added.
The US has already built a wall between San Diego and Tijuana, and now plans to fence off other parts of the border in California, Arizona, New Mexico and Texas.
President George W Bush has said that "border security must adapt to the nation's changing needs".
But critics of the US bill say some of the measures would be impossible to enforce and would push illegal immigrants further underground.