The quake struck some 43 kilometers (27 miles) southwest of the capital of Managua at 10:00 pm (0400 GMT), the US Geological Survey reported.
The USGS said the quake occurred at a depth of 85 kilometers.
Nicaragua's national disaster prevention agency SINAPRED activated precautionary measures in the departments of Managua and Leon, where the earthquake was felt most strongly, government spokeswoman and First Lady Rosario Murillo told reporters.
The quake was attributed to movement along the Cocos and Caribbean plates that pass through Central America.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.