The president wrote he was nixing the trip - initially scheduled for next month - because he is displeased with the location of the new embassy and its price tag.
Mr Trump also criticised the location of the new building in Vauxhall, south London, as an "off location", adding: "Wanted me to cut ribbon-NO!"
However, President Trump announced that he had cancelled the visit in a tweet on Thursday.
The American president claimed on Twitter that his reason for calling off the trip was his displeasure at Barack Obama having sold the current embassy for "peanuts" and built a replacement for $1.2bn.
Trump's U-turn has been welcomed by many who were preparing to take to the streets to protest his presence. The move, which ended a 200-year US association with London's Grosvenor Square, was part of American efforts to secure diplomatic staff in compounds - a push tied to terror concerns after al-Qaida bombings at two USA embassies in East Africa a decade ago.More news: The Driverless Chevy Bolt From GM Won't Let You Drive at All
Unrest during the president's visit would be an embarrassment for the United States, which has been one of the U.K.'s closest allies for a century.
The London mayor - who has clashed with the president in the past - said a visit by Trump would have been met by "mass peaceful protests".
But the relationship between Trump and May has been far from rosy.
British government sources said they had never officially been informed of a date, but there was speculation Mr Trump would formally open the embassy at a ceremony in February. The sale was made because the British government wanted to list the building as one of historical importance, which would have made renovations and a potential sale more hard to do.
When asked if the Prime Minister was concerned that Khan was damaging the "special relationship", the Downing Street spokesman replied: "No, the U.S. and the United Kingdom are natural, resilient and strong partners and allies and we do more together than any two countries in the world".
As pointed out by Khan, this would be largely because of "his divisive agenda" on racial and cultural issues, but is surely also spurred on by Trump's sharing of a Britain First tweet last month.