According to official estimates, around 20,000 people participated in protests in the country's capital of Mexico City while a march in Guadalajara, Mexico's second largest city, drew as many as 10,000 participants.
Tensions between the USA and Mexico are soaring over Trump's policies on immigration, trade and planned wall on the border.
But some also raged against Mexican President Enrique Pena Nieto.
Since his presidential campaign, Trump has vowed to force Mexico to negotiate trade deals, saying it has been detrimental to the manufacturing industry in the United States, sending shock waves of uncertainty for the already weakened Mexican economy.
Trump made his comments in two Twitter posts but did not say how he would bring down the cost of the wall.
Last month, Trump signed an executive order which bars citizens from Iran, Iraq, Syria, Sudan, Somalia, Libya and Yemen from traveling to the United States for 90 days, stops accepting refugees for 120 days and indefinitely halts refugees from Syria. No violence was reported.
"Mexicans demand respect, we want bridges not walls", read one banner carried by nearby marchers.
There are estimated 11 million undocumented immigrants living across the United States.
Others held signs saying "Trump, pay for your own wall!" in relation to the U.S. president's desire to have Mexico pay for the wall.
Lopez Obrador, has been labelled by political critics as a "leftist Donald Trump" for his populist, anti-establishment rhetoric. Big March there today to #resist Trump. "Mexico has never been so threatened and never have we had a government so incompetent".
Nevertheless, Mexican consulates in the USA have been swamped with calls from anxious Mexicans concerned they may get deported under Trump.