Mr Johnson was taken into hospital on Sunday, after symptoms of coronavirus - for which he had tested positive - had failed to clear.
As his condition worsened he was moved into intensive care where he spent three nights before moving back to a general ward on Thursday.
Now, the PM will travel to Chequers, the Prime Minister's country retreat, to recuperate, and a Number 10 spokesman said, on medical advice, he would not be returning to work immediately.
The spokesman said: “On the advice of his medical team, the PM will not be immediately returning to work. He wishes to thank everybody at St Thomas’ for the brilliant care he has received.
“All of his thoughts are with those affected by this illness.”
Mr Johnson's fiancee Carrie Symonds, who is pregant with their child and has also overcome the illness, tweeted: “There were times last week that were very dark indeed. My heart goes out to all those in similar situations, worried sick about their loved ones.
“Thank you also to everyone who sent such kind messages of support. Today I’m feeling incredibly lucky."
She added: "I cannot thank our magnificent NHS enough. The staff at St Thomas’ Hospital have been incredible. I will never, ever be able to repay you and I will never stop thanking you."
Several vehicles, including police vans, were seen leaving St Thomas’ Hospital shortly after Downing Street announced that the Prime Minister had been discharged.
Mr Johnson had been at the central London hospital for seven days.