The quake struck at a relatively shallow depth of 17km off the east coast of Sulawesi island, the USGS said, where a 7.5-magnitude quake-tsunami around the city of Palu killed more than 4,300 people last year.
According to the Malaysian Meteorological Department, the epicentre of the quake was in Sulawesi, about 223km north of Kendari, Indonesia.
However, the department said that there was no Tsunami threat to Malaysia.
But the USGS warned that considerable damage was possible in poorly built or badly designed structures.
The quake hit off the coast of eastern Sulawesi, on the other side of the island from disaster-hit Palu.
Indonesia is one of the most disaster-prone nations on Earth due to its position straddling the so-called Pacific Ring of Fire, where tectonic plates collide.
The sprawling archipelago is also lined with over 100 volcanoes.
At the end of last year, an erupting volcano in the middle of the Sunda Strait between Java and Sumatra islands killed more than 400 people.