The tremors were strong enough to be felt in Istanbul and the capital Ankara. At least 35 people were injured, officials say, BBC reported.
Estimates of the quake's depth vary from 2km to 10km.
There are reports of power being disrupted in the region, as well as some residents jumping from balconies.
Another 4.7 quake was reported some 20 minutes after the first.
Turkish Interior Minister Suleyman Soylu said there had been no information about the loss of life.
But later Turkey's disaster agency said 32 had been injured in Duzce, one in Istanbul, one in Zonguldak on the Black Sea coast and one in Bolu, to the southeast.
Photos from Duzce at night show many people huddled outdoors, wrapped in blankets and using makeshift fires to keep warm.
Security camera footage of the earthquake has been posted on social media.
The quake shook many tiles and panels off Duzce's courthouse - a photo shows the debris at the bottom of the building.
Duzce was hit by a major 7.2 magnitude earthquake in 1999 which left at least 845 people dead.
It followed an even larger quake months earlier in the city of Izmit, 100km to the west, which killed more than 17,000 and left buildings in the region in a weakened state.
Some 80% of Duzce's buildings have been rebuilt since the 1999 earthquakes, the city's mayor told local media.
ZZ/PR