While the shaking caused panic among residents there were no immediate reports of casualties or major damage.
The quake occurred in an area south-southeast of the city of Ternate, the USGS said.
Indonesia’s meteorology agency (BMKG) said the quake was not in danger of causing a tsunami.
Aftershocks have already been recorded.
“There are no reports of infrastructure damage yet,” said Iksan Subur, an official with Indonesia’s disaster mitigation agency based in the regency of South Halmahera, near the earthquake’s epicentre.
“But people panicked and ran out of their houses. Some people who live near the ocean are starting to move to higher ground,” he told Reuters by phone.
The national disaster mitigation agency also said the quake did not have the potential to cause a tsunami.
The most devastating earthquake in recent Indonesian history was in 2004, when a magnitude 9.5 quake triggered a massive tsunami that killed around 226,000 people along the shorelines of the Indian Ocean, including more than 126,000 in Indonesia.
(Production: Emily Cooper)