The tremors reportedly lasted 40 seconds.
There have been no reports of serious injuries or damage.
Geoscience Australia reported six smaller aftershocks within 90 minutes of the quake.
Seismologist Hugh Glanville told News Corp Australia.
“On average we get one or two earthquakes over magnitude 5 each year. We had a magnitude 6 in central Australia earlier this year but this is the biggest in Queensland in 20 years. It’s significant,” he said.