The resignations of the two Cabinet “big beasts” comes just days after Mrs May secured senior ministers’ agreement at Chequers for a Brexit plan about which both men had expressed reservations.
Mr Davis was first to go, announcing his exit just before midnight on Sunday.
But there was growing speculation about Mr Johnson’s plans on Monday after he failed to attend a meeting of the Government’s Cobra emergencies committee as well as a summit of Western Balkan nations being held in London.
At 3pm on Monday, a statement was issued by Downing Street to say: “This afternoon, the Prime Minister accepted the resignation of Boris Johnson as Foreign Secretary. His replacement will be announced shortly. The Prime Minister thanks Boris for his work.”
Staunch Brexiteer Dominic Raab was named as Mr Davis’s replacement as Secretary of State for Leaving the EU.
Mr Johnson was the figurehead of the Leave campaign in the 2016 referendum, but dramatically pulled away from an expected leadership bid after losing the support of fellow minister Michael Gove.
Mrs May surprised many by appointing him to the Foreign Office, a position he has frequently used to forge a distinctive position on Brexit, including by setting out his own “red lines” just days before the PM’s crucial speech to Conservative conference last year.
He was widely reported to have told the Chequers meeting on Friday that putting a positive gloss on Mrs May’s Brexit package would be like “polishing a turd”, though he later joined other ministers in signing up to the package.
There was no immediate statement from Mr Johnson to explain his decision to quit, which was seized upon by opposition politicians as a sign of increasing turmoil within Mrs May’s administration.
Labour deputy leader Tom Watson said: “Theresa May’s Government is in meltdown. This is complete and utter chaos.
“The country is at a standstill with a divided and shambolic Government. The Prime Minister can’t deliver Brexit and has zero authority left.”
Former Ukip leader Nigel Farage welcomed Mr Johnson’s decision on Twitter, saying: “Bravo Boris Johnson. Now can we please get rid of the appalling Theresa May and get Brexit back on track.
“Time for Michael Gove to decide. Party or country, career or principle?”
But the leader of Scottish Conservatives, Ruth Davidson, said Mrs May was “correct to accept the Foreign Secretary’s resignation”.
In a pointed message, the President of the European Council Donald Tusk appeared to suggest that the resignations could spell the end for Brexit.
“Politicians come and go but the problems they have created for people remain,” said Mr Tusk.
“I can only regret that the idea of Brexit has not left with Davis and Johnson. But...who knows?”
Mrs May was cheered loudly by Tory MPs as she took her seat in the House of Commons ahead of a statement on her Brexit plan, which was scheduled ahead of the dramatic resignations.
The PM told MPs she wanted to recognise the work of the former Brexit secretary on steering through some of the “most important legislation for generations” and the “passion” that the outgoing foreign secretary had shown in promoting a “global Britain to the world”.
But she said: “We do not agree about the best way of delivering our shared commitment to honour the result of the referendum.”