A humpback whale, which died on a NSW mid-north coast beach, had dragged a fishing trap and ropes more than 1,700 kilometres before it met its end.

Beaches along the Port Macquarie coast are closed today due to the danger posed by the whale carcass.

On Sunday, the humpback was freed from its entanglement in a fishing trap by the NSW National Parks and Wildlife Service (NPWS) whale disentanglement team, but it beached itself a few hours later.

Port Macquarie Marine Rescue unit commander Neil Yates said the trap it was caught-up in has been identified as coming from Tasmania.

"It looks like it's actually been tangled for possibly a year," he said.

"It doesn't look like it was a fresh entanglement and as such the condition of the animal was very poor.

"But the big message to get to people now is that the carcass is deteriorating.

"There will be some bits and pieces floating in the water which is going to attract large predators.

"Do not go in the water. I can assure you there are some very large sharks out there."

The whale has been buried at Nobbys Beach after unsuccessful attempts to tow it out to sea. ( Supplied: NSW National Parks and Wildlife Service )

The annual southerly migration of humpbacks is underway, returning from their warm water feeding grounds in southern Queensland to their Antarctic krill feeding grounds.

The whale rescue and research organisation ORRCA has responded to many whales caught up in marine debris, including buoys and ropes, this migration season.

Vice president Shona Lorigan said such entanglements often prove to be fatal.

"This is a huge journey that the whales are undertaking from Antarctica to Queensland and back," she said.

"They don't really feed, they may opportunistically feed along the way, but the bulk of the feeding for a humpback whale is done in Antarctica.

Shark sightings prompted the Port Macquarie beach's closure. ( ABC News: Emma Siossian )

"So they are expending a huge amount of energy for the journey.

"So if they then have a little bit of added hardware to trail behind them, whether it be a trap or a whole lot of buoys and floats, it makes that journey much tougher."

The Port Macquarie-Hastings Council said that in consultation with the NPWS and ORRCA a decision was made to bury the 20-tonne animal in a deep hole on Nobbys Beach.

It was the option of last resort after efforts to tow it out to sea failed.

Beaches along the Port Macquarie coastline are closed until further notice.