The quake occurred at a depth of 10 km (6 miles) in an area 168 km 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, Presstv Reported.
At least seven aftershocks stronger than magnitude 5 were recorded following the main quake, BMKG official Rahmat Triyono said in a statement.
The agency said the main quake was felt in other parts of Indonesia, including cities on Sulawesi island and in Sorong on Papua island.
The quake hit hours after a magnitude 6.6 struck offshore Western Australia, south of Indonesia.
“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 epicenter. “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 case a tsunami, and asked people to remain calm and on alert for more aftershocks.
Last week, the BMKG issued a tsunami warning, which was later lifted, after a magnitude 6.9 quake hit off the northeastern shore of Sulawesi, west of Sunday's quake.
Indonesia is situated on the so-called Pacific Ring of Fire, which is frequently hit by earthquakes and sometimes accompanying tsunamis.
The most devastating in recent Indonesian history was on December 26 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.
Last year, a tsunami hit the city of Palu in Sulawesi, killing thousands.