The Prime Minister had been alerted by NHS Test and Trace along with Chancellor Rishi Sunak as a contact of health secretary Sajid Javid, who tested positive for Covid-19.
On Sunday morning Downing Street claimed the pair was taking part in a daily contact testing pilot and would not have to self-isolate, with a spokesman insisting they would only be conducting “essential government business”.
Then just two hours later after an escalating backlash, Number 10 said Mr Johnson and Mr Sunak would self-isolate after all.
A No.10 spokesman said: “The Prime Minister has been contacted by NHS Test and Trace to say he is a contact of someone with Covid.
"He was at Chequers when contacted by Test and Trace and will remain there to isolate.
"He will not be taking part in the testing pilot. He will continue to conduct meetings with ministers remotely.
"The Chancellor has also been contacted and will also isolate as required and will not be taking part in the pilot.”
The Prime Minister on Sunday afternoon tried to claim the pair was not signed up to the pilot just hours after Downing Street said they were.
Mr Johnson said: “We did look briefly at the idea of us taking part in the pilot scheme, which allows people to test daily, but I think it’s far more important that everybody sticks to the same rules and that’s why I’m going to be self-isolating until Monday, 26th July.
“I know how frustrating it is, but I really do urge everybody to stick with the programme and take the appropriate course of action when you’re asked to do so by NHS Test and Trace.”
Mr Sunak added: “Whilst the test and trace pilot is fairly restrictive, allowing only essential government business, I recognise that even the sense that the rules aren’t the same for everyone is wrong.
“To that end I’ll be self isolating as normal and not taking part in the pilot.”
SNP Westminster leader Ian Blackford criticised the pair for trying to avoid self isolating.
He said: “Blundering Boris Johnson is guilty of yet another monumental and dangerous failure of leadership – a hallmark of his chaotic and corrupt government.
“He clearly labours under the mistaken belief that necessary rules which apply to everyone else do not affect him and his cabal of entitled chums like Chancellor Rishi Sunak.
"We know from the previous Dominic Cummings catastrophe at Barnard Castle that chaotic Covid messaging from government results in a public breakdown in trust and understanding that, in turn, can ultimately cost lives.
“Johnson’s U-turn to self-isolate only happened because of the predictable and justified public backlash. Yet again, he is guilty of breath-taking arrogance and a cavalier disregard of public health.
“Meanwhile, as Covid infection rates continue to spiral, his decision to press ahead this week with the full removal of almost every Covid restriction increasingly looks reckless.”
The plan to avoid self-isolation had earlier prompted an angry response from opposition parties, with Liberal Democrat leader Sir Ed Davey claiming it was “one rule for them and another rule for everyone else”.
He continued: "I’m glad Johnson U-turned – right decision. But the fact he thought he could get away with it in the first place shows the utter contempt he has for the British people.
“How about the school teachers, transport workers and health workers getting a chance to be part of this test pilot or is it only for the privileged few?
“People have stuck to the rules and done the right thing. Boris Johnson is taking them for granted.”
Sir Keir Starmer claimed the U-turn showed a government “in chaos”.
The Labour leader said: “Boris Johnson and Rishi Sunak have been busted yet again for thinking the rules that we are all following don’t apply to them.
“The public have done so much to stick to the rules. At a time when we need to maintain confidence in self isolation, parents, workers and businesses will be wondering what on earth is going on in Downing Street.
“The way the Prime Minister conducts himself creates chaos, makes for bad government and has deadly consequences for the British public.
“Yet again the Conservatives fixed the rules to benefit themselves and only backtracked when they were found out. They robbed the bank, got caught and have now offered to give the money back.”
Shadow health secretary Jonathan Ashworth earlier claimed it would leave the public dismayed by the “special, exclusive rule”.
He told Sky News: “For many of them, waking up this morning to hear that there is a special rule, an exclusive rule, for Boris Johnson and Rishi Sunak, they will be saying that this looks like one rule for them and something else for the rest of us.
“Nobody understands how you can get access to this special treatment or VIP lane where you don’t have to isolate yourself.
“If it is a pilot, why can’t employers apply for their workforce to be part of this pilot, why can’t schools apply to be part of this pilot test?
“I do think a lot of people are going to be looking at this and thinking ‘what on earth is going on?’”
UK communities secretary Robert Jenrick had earlier defended the decision and urged members of the public who were pinged to still self-isolate.
He said: “It is correct that the Cabinet Office and Downing Street are part of the pilot. I am not aware that other [government] departments are.
“It means that you can be tested every day in specialist asymptomatic testing centres such at the one that has been set up in Downing Street.
“It means that the Chancellor and the Prime Minister will be able to conduct the most essential government meetings, but the rest of their time will have to be spent isolating and not meeting up with family or friends or socialising. So it is relatively restrictive.
“I entirely appreciate that this isn’t available yet to wider members of the public and the frustration that they might feel listening to this.
“Other members of the public who are pinged will have to self-isolate in the usual way and that is a really important part of our plan to keep Covid under control.”