SAD TRIP: Water Police towed the dead humpback whale out to sea after it washed up in Mooloolaba River.
A sick humpback whale that touched the hearts of people along the Sunshine Coast has finally died.

The 6.5m mammal was first seen off the Gold Coast a week ago and slowly swam north, reaching the Mudjimba area by Thursday.

On Friday it returned south and attracted a large crowd as it rubbed against the rock wall at the mouth of the Mooloolah River.

But as darkness fell on Friday night, the young whale swam quietly into the river and passed away overnight.

A spokesman for the Department of Environment and Heritage Protection said the whale stranded itself within the Mooloolaba marina, where it died under a pontoon.

A vet from Seaworld inspected the animal late Friday but decided nothing could be done to save it.

He later took samples of skin and blubber from its carcass in an attempt to determine its cause of death.

"It had obviously been suffering for some time but he couldn't hazard a guess (to the cause of death)," a Seaworld spokesman said.

"Every season three or four of these majestic creatures don't make it for some reason. They're not fit enough or strong enough for the trip."

A Mooloolaba Water Police crew was called in to tie a rope around the dead whale's tale and tow it 20km from shore.

A police spokesman said the eight-tonne animal was a heavy load for the boat, which could average only two knots for the trip.

Humpback whales travel along the Queensland coast from June to early November each year on their southern migration to Antarctica.

"Around 20,000 humpback whales travel along the Queensland coast during this time," the Department of Environment and Heritage Protection statement said.

"As humpback whale numbers increase, it is likely that the number of strandings will also increase."

If you see a stranded whale, alive or dead, please report it immediately by calling the RSPCA's stranding hotline 1300 ANIMAL (1300 264 625).