His comments came after five violent attacks in London in less than 24 hours left three men dead and three injured.
Labour leader Jeremy Corbyn said it was “absolutely awful” Mr Trump was using the “tragedy of people being murdered to attack the mayor”.
Police have increased patrols in the capital following the attacks.
President Trump’s tweets follow a long-running feud with Khan.
Retweeting a post by right-wing commentator Katie Hopkins about this weekend’s violence in London, the president said Mr Khan was “a disaster” and the capital needed a new mayor.
Mr Trump later followed it up with another post saying: “He is a national disgrace who is destroying the city of London!”
In response, Mr Khan’s spokesman said the mayor’s thoughts were with the victims’ families and he “is not going to waste his time responding to this sort of tweet”.
The mayor was focused on supporting the city’s communities and “over-stretched” emergency services, he added.
Mr Khan later tweeted: “Violent crime has no place in our city, and there’s no higher priority for me than Londoners’ safety.”
Mr Corbyn tweeted in defence of Mr Khan, saying he was “rightly supporting the police to do their job while Katie Hopkins spreads hateful and divisive rhetoric”.