Dr Catherine Calderwood resigns after making two trips to her second home during the current lockdown period.
Initially, First Minister Nicola Sturgeon continued to back Dr Calderwood despite the revelation.
Dr Calderwood had apologised for contravening lockdown rules but later released a statement saying she had quit from her role.
After speaking again with the First Minister, Dr Calderwood decided to resign stating that her actions may cause distraction away from the pandemic response.
A police warning had been given to Dr Calderwood following the Scottish Sun publishing photographs of her and her family visiting Earlsferry in Fife.
The location the doctor was seen at is more than an hour’s drive from her family home.
The contradictory nature of the doctor’s actions compared to the message she was presenting placed her in an untenable position.
Dr Calderwood was fronting TV and radio adverts promoting the lockdown policy.
Dr Calderwood accepted it was a “mistake” and subsequently issued an apology on Sunday.
The First Minister repeatedly stated that she wanted Dr Calderwood to remain in her post citing her expertise to be “invaluable”.
On Sunday, the First Minister stated that Dr Calderwood would not attend any further briefings on coronavirus “for the foreseeable future”.
The doctor will however continue to provide scientific and medical advice to the Scottish Government.
Dr Calderwood said:
“The first minister and I have had a further conversation this evening and we have agreed that the justifiable focus on my behaviour risks becoming a distraction from the hugely important job that government and the medical profession has to do in getting the country through this coronavirus pandemic.”
“Having worked so hard on the government’s response, that is the last thing I want.”
The Deputy Chief Medical Officer Dr Gregor Smith will step up into Dr Calderwood’s role.