Initially, both areas will remain at Level 3 for a week, with a further decision made at the end of next week.
The situation in Glasgow is causing even more concern than Moray, with initial research suggesting the outbreak could be being driven by the Indian variant of the virus.
Ms Sturgeon stressed Scotland’s battle against coronavirus "remains good".
She added: "It is inevitable that as we continue to navigate our way through this pandemic, we will hit bumps in the road.
"However, if we exercise suitable caution as we’re seeking to do today, then even though that is difficult, we are much more likely to stay on the right track overall."
Listen to our latest coronavirus podcast:
Ms Sturgeon told MSPs that "pressing pause" would ensure that coronavirus measures would not have to be reimposed at a later date.
The First Minister added: "I know how disappointing this will be, but pressing pause for a few days will hopefully avoid a situation in which we have to impose even more restrictive measures over the next few weeks."
People are being advised not to travel in or out of the affected council areas, while the First Minister added she was optimistic that increased testing and vaccination would help to curb the increased spread of the virus.
What you can and can't do in Scotland?
In Level 2 areas, six people from three households will be able to meet in homes and can also stay overnight. Under the original route map out of lockdown, this was four people from two households.
Outdoors, people can meet in groups of eight from eight households.
Currently, people in Scotland are able to meet in groups of six outdoors and hospitality venues can open until 8pm indoors, but without alcohol, and 10pm outdoors where alcohol is allowed to be consumed.
Other businesses that can reopen from May 17 include cinemas, theatres, concert halls, comedy clubs and casinos. Colleges and universities will be able to resume some in-person teaching.
Outdoor adult contact sport can also resume.
There will be changes to the number of people allowed to attend events. Up to 100 people can attend an indoor event, up to 250 people for outdoor events with unrestricted standing and up to 500 people for outdoor events with seating.