The House of Representatives has approved tough legislation against immigration in the US.
The Mexican government has given advice on crossing the border safely
The bill would make it easier to deport terrorist suspects and would require states to check that applicants for driving licences are in the US legally.
Supporters say the measures would help to protect against terrorist attacks, by "disrupting... [their] travel".
Civil rights groups said the legislation would undermine the US' commitment to liberty.
Mexico said it objected to a clause that would allow a border fence to be completed in the Californian city of San Diego.
"We're against building any wall between our two countries because they are walls that increase our differences," Mexican Interior Minister Santiago Creel said.
"The walls don't stop the migration flow," he added.
Correspondents say the bill is expected to have more difficulty in the Senate. Congress rejected similar measures as part of an intelligence reform overhaul last year.
Many Republicans in the US Congress have been pressing for a clampdown on illegal immigration since the 11 September 2001 attacks.
They argue that poor security on the Mexican border could be used by terrorist groups to move their members into the US.
President Bush has said a deal on Mexican immigration is a priority
"Common sense says we should not allow suspected terrorists to be able to stay inside our borders if they could harm us," Speaker Dennis Hastert said.
The BBC's Simon Watts in Miami says the Mexican government senses an increasing hostility in the US towards its citizens.
The gap in the fence in San Diego is used by thousands of illegal immigrants a year.
The Mexican government also thinks its nationals who live illegally in the US would struggle to get by without a driving licence.
Senior Mexican and US officials met last month to discuss border security and a proposed immigration deal.
The two failed to make progress on a programme to give Mexicans a right to work temporarily in the US.
The proposed guest workers' scheme is backed by President George W Bush but faces strong opposition from Republicans.
At the same time, the success of Thursday's proposed bill is likely to depend on the president, who has said he will make it a priority to get the guest workers' programme through Congress against opposition.
Observers say there could be some sort of trade-off in the Senate that would allow both bills to pass.