Enrique Peña Nieto announced he would not be travelling to the United States next Tuesday as Donald Trump insisted Mexico would have to pay for a wall between America and Mexico.
Just hours before, Mr Nieto repeated his country "will not pay for any wall" and said he would not be cancelling his trip later this month.
Mr Trump hit back by saying "it would be better to cancel the upcoming meeting".
Soon after Mr Nieto announced the trip was off.
This morning I informed the White House I will not be attending the meeting
Enrique Peña Nieto, Mexican President
The Mexican president tweeted: "This morning I informed the White House I will not be attending the meeting scheduled for next Tuesday with @POTUS.
"Mexico reiterates its willingness to work with the United States to achieve agreements in favour of both nations."
Donald Trump signed an executive order to build a border wall between the US and Mexico
Esta mañana hemos informado a la Casa Blanca que no asistiré a la reunión de trabajo programada para el próximo martes con el @POTUS.
— Enrique Peña Nieto (@EPN) January 26, 2017
At 2.12pm GMT, supposedly after Mexico had pulled out of the trip, Mr Trump tweeted: "The US has a 60 billion dollar trade deficit with Mexico.
"It has been a one-sided deal from the beginning of NAFTA with massive numbers of jobs and companies lost.
"If Mexico is unwilling to pay for the badly needed wall, then it would be better to cancel the upcoming meeting."
Mr Trump landed in Philadelphia moments after Mr Nieto announced he had cancelled his trip
Mr Trump landed in Philadelphia on his first trip aboard Air Force One just moments after Mr Nieto's announcement.
Traditionally the Mexican President is the first overseas leader to meet a new president.
However, as has quickly become the norm with Mr Trump's six-day old leadership, the billionaire has parted with tradition by inviting Theresa May to be the first to meet him.
The British Prime Minister arrived in the United States within minutes of the Mexican President's cancellation announcement.
Theresa May arrived in Philadelphia this afternoon
Mr Trump flew in Marine One to board Air Force One for the first time
Yesterday, the President made good on one of his central campaign promises by signing an executive order to begin building the Mexico wall "immediately".
He announced he will employ 5,000 new border security agents and will begin a concerted effort to deport illegal immigrants and criminals back to their home country.
He said: "We want other countries to take back their criminals."
The 70-year-old also said "sanctuary cities" – those complicit in harbouring illegal immigrants – will see their federal funding drastically reduced.
Several watchtowers and aerial border patrols will be installed to slash the number of Mexicans flowing over the almost 2,000 mile border.
He said he would be "bringing back law and order to America".
Trump: Receiving nuclear codes "a very very scary thing"
Boris Johson: With Trump, we are front of the queue
Actor Shia LeBeouf arrested at anti-Trump protest
Mr Trump and Mr Nieto have not been on the best of terms since the very first days of the Trump campaign when he said some Mexicans entering the US are criminals and rapists.
During the campaign Mr Trump flew to Mexico City to meet Mr Nieto where the now-President said they discussed the wall Mr Trump had vowed to build, which the Mexican presidnet later disputed.
After their meeting, Mr Nieto, tweeted: "At the start of the conversation with Donald Trump, I made i clear that Mexico will not pay for the wall."