The 8m-9m whale died about 10pm after the tide went out, leaving it stranded on the sandbank.
The deep-water whale was first seen by members of the public beached near rocks at the entrance to the inlet about 3pm yesterday and, when the tide came in, it floated down the channel to again become beached, this time on a sandbank.
Doc staff went out in a boat to take a closer look about 6pm and attempted to encourage it into moving by making loud noises, first from the boat's engine and then by using a loud horn.
It was hoped to get it into deeper water in the channel so it would float with the lowering tide out to sea.
But they were unable to get the whale to move.
The whale was discovered alive by Kylae McGregor and Haeata Meihana about 3pm.
Ms McGregor said they stayed with the whale, but there was not much they could do.
They followed it as it washed into the inlet.
"It's quite emotional. It looks so exhausted. We want to see it get back out."
Doc biodiversity assets programme manager David Agnew said it was reasonably common for beaked whales to wash up on New Zealand beaches, but they were normally already dead.
"It is a bit unusual to see a live one. Our assumption is that it is not well."
It had no obvious injuries, but its behaviour indicated it was very unwell.
The dead whale was possibly an Arnoux beaked whale and, once that was determined, an assessment would be made to see what scientific interest there was in the whale.
In August this year, two beaked whales, a Gray's and a Curvier's, washed up on beaches along the Catlins coast.
There have been 148 Gray's reported washed ashore since 1873 and 80 strandings of the Curvier's whale.