Mr Hancock’s resignation comes after a video, which was released on Friday, June 25, appeared to show the Health Secretary kissing aide Gina Coladangelo.
Pictures published in The Sun newspaper also showed Mr Hancock in an embrace with Mrs Coladangelo last month.
A statement from 10 Downing Street said: “The Queen has been pleased to approve the appointment of the Rt Hon Sajid Javid MP as Secretary of State for Health and Social Care.”
On Saturday Conservative MPs began to break ranks to call for Mr Hancock to go.
Mr Hancock wrote to Boris Johnson today, Saturday, June 26 and said: “The last thing I would want is for my private life to distract attention from the single-minded focus that is leading us out of this crisis.
“I want to reiterate my apology for breaking the guidance, and apologise to my family and loved ones for putting them through this. I also need to be with my children at this time.”
Mr Johnson had refused to sack Mr Hancock, with his spokesman saying the PM considered the matter closed after receiving the West Suffolk MP’s apology on Friday.