The quake's epicenter was 58 km south (36 miles) of Esmeraldas at a depth of 10 km.
A destructive Pacific-wide tsunami was not expected, the Pacific Tsunami Warning Center said in a statement.
A 7.8 magnitude earthquake last month, Ecuador's worst in nearly seven decades, killed more than 650 people and injured around 16,600.