The Republican presidential hopeful told the New York Times that he was happy to see Mr Khan elected, saying it could be “very, very good”.
However the new mayor has hit back, warning that Mr Trump’s “ignorant” view of Islam could make both Britain and the US less safe.
“This isn’t just about me - it’s about my friends, my family and everyone who comes from a background similar to mine, anywhere in the world,” he said.
When asked by the New York Times how his proposed ban on Muslims would apply to Mr Khan, Mr Trump said: “There will always be exceptions.”
Despite his outspoken views on Muslims, he insisted he was pleased to see Mr Khan elected as the capital’s first Muslim mayor.
“I was happy to see that. I think it’s a very good thing, and I hope he does a very good job because, frankly, that would be very, very good.”
“Because I think if he does a great job, it will really - you lead by example, always lead by example. If he does a good job, and frankly if he does a great job, that would be a terrific thing.”
However Mr Khan retorted: “Donald Trump’s ignorant view of Islam could make both of our countries less safe - it risks alienating mainstream Muslims around the world and plays into the hands of extremists.
“Donald Trump and those around him think that Western liberal values are incompatible with mainstream Islam - London has proved him wrong.”