Large areas of the coastline covered by the advisory are still recovering from the 2011 quake and tsunami disaster that killed more than 18,000 people and triggered a meltdown at the Fukushima Daiichi nuclear plant.
Plant operators Tokyo Electric said there were no immediate reports of abnormality after the quake, according to Kyodo news agency.
The meteorological agency advised people to leave the coast immediately, while Japan's public broadcaster NHK said some local authorities issued evacuation advisories to their residents.
Kyodo said the city of Iwate had issued an evacuation advisory.
The United States Geological Survey said the quake struck around 129 kilometres (79 miles) east south-east of Namie, Japan, an estimated 284 kilometres (176 miles) east north-east of the capital Tokyo, at 4.22 am local time (1922 GMT Friday).