The city's main airport halted operations as a precautionary measure to evaluate its infrastructure following the tremor, according to the airport's official Twitter account.
An official at a national emergency service contacted by Reuters said the group had not received any reports of serious damage.
Local television and social media showed images of dust clouds that had formed outside the city as a result of shifting earth at quarries in the area.
It said the moderate quake was only 7.7 km deep, with its epicentre located 22.5 km northeast of Quito, a city of around 1.6 million inhabitants.
A magnitude 5.1 quake is capable of causing considerable damage