The quake struck at a depth of 85 kilometres (51 miles) near the eastern coast around 150 kilometres from the capital, Port Moresby, it said.
People scrambled from office buildings in the capital after being jolted by the quake, which hit around 12.50pm local time (0250 GMT).
Reports said the quake was felt in towns and cities across a wide swathe of the country and as far as Bougainville island, 900 kilometres off the coast.
There were no immediate reports of damage or casualties.
The Pacific Tsunami Warning Centre initially issued a warning of potentially hazardous waves in nearby coastal areas, but later cancelled the alert.