In a statement issued on Wednesday morning, Darroch said it was now “impossible” for him to do his job.
Theresa May, who had publicly backed Darroch, said it was a “matter of great regret” that he had chosen to quit.
The ambassador had described the Trump administration as “inept”, “incompetent” and “uniquely dysfunctional” in Foreign Office memos leaked to the Mail on Sunday.
The leak has soured relations with the Donald Trump administration and prompted a Twitter tirade from the US president.
On Tuesday, the US president described Darroch as a “pompous fool” and a “very stupid guy” who had been foisted on the US.
Downing Street supported Darroch after Trump warned that the White House would have nothing more to do with him.
But on Tuesday night Johnson refused to rule out sacking the ambassador if he successfully wins the leadership race to replace Theresa May as prime minister.
HuffPost UK understands Darroch made his decision to quit after watching the ITV leadership debate.
Foreign Office minister Alan Duncan told the BBC Johnson had “thrown our top diplomat under the bus”.
Sir Patrick McLoughlin, a former Tory party chairman, accused Johnson of “failing to stand up for hard working civil servants, who have done nothing wrong, under attack from foreign governments”.
“Leadership involves standing up for your team. If we don’t call out those who want a witch-hunt through the civil service we are complicit in creating divisions that may never heal,” he said.
Jeremy Hunt, the foreign secretary and Johnson’s rival for the Tory leadership, had defended Darroch.
He told the debate last night that it was for the British government to choose its ambassadors and Darroch would remain in post should he become PM.
Hunt said today he was “deeply saddened” by his resignation. “Whenever I visited Washington as foreign secretary, I was struck by Sir Kim’s professionalism and intellect. I am outraged that a selection of his reports should have been leaked,” he said.
Speaking in the Commons today, Jeremy Corbyn also said he regretted Darroch’s decision. “He has given honourable and good service,” the Labour leader said.
In his statement, Darroch said: “Since the leak of official documents from this Embassy there has been a great deal of speculation surrounding my position and the duration of my remaining term as ambassador. I want to put an end to that speculation.
“The current situation is making it impossible for me to carry out my role as I would like.
“Although my posting is not due to end until the end of this year, I believe in the current circumstances the responsible course is to allow the appointment of a new ambassador.
“I am grateful to all those in the UK and the US, who have offered their support during this difficult few days. This has brought home to me the depth of friendship and close ties between our two countries. I have been deeply touched.
“I am also grateful to all those with whom I have worked over the last four decades, particularly my team here in the US. The professionalism and integrity of the British civil service is the envy of the world. I will leave it full of confidence that its values remain in safe hands.”