The mammal, believed to be either a sei or a fin whale, was discovered near Gerinish on South Uist at around 1pm yesterday.
It was about 56ft (17m) long and weighed two tonnes.
Volunteers from British Divers Marine Life Rescue (BDMLR) attempted to refloat it but it was not possible to get it back into the water.
Rescuers said the sheer size and weight of the whale meant the chances of saving it were slim.
They also considered euthanasia but that option was also difficult because it was so large.
Ali Jack, of the BDMLR, said: "The animal has now died. Because of its size there was nothing that could be done.
"We just tried to keep it comfortable."
He said a post-mortem examination would be carried out on the whale as soon as possible to try to find out what caused it to beach.
Navigational error and sickness are both possibilities, he added.
Mr Jack said it had been an emotional time for the volunteers taking part in the rescue attempt.
He said: "It's been a bit of a rollercoaster.
"It's been quite emotional for all of the people involved, knowing it was absolutely certain that the animal was going to die.
"It's been quite hard because of the length of time it took to die."
Sei whales are rare in Scotland, with only a handful of reported sightings in recent years.
The BDMLR spokeswoman said they normally live in warmer, deeper waters and it was "extremely unusual" if one of the species had come into such shallow waters.
Scotland has seen two mass strandings of pilot whales in the past year.
In July, around 60 beached at the Kyle of Durness, with some 40 of them later being returned to the sea.
In May, around 60 pilot whales appeared in Loch Carnan, South Uist, although they left the loch after one of them died. The dead whale was later found on an island in the loch.
A post-mortem examination suggested it had died of infection.
Rescuers later said a second whale was found dead in the same loch. It is thought to have died elsewhere and floated in on the tide.
At the end of October last year, other pilot whales almost got stranded in Loch Carnan.
Less than a week later, 33 whales, believed to be the same group, were found dead on a beach in Co Donegal in Ireland.
What are sei whales? The whales are found in all oceans but are not often found in “extreme waters” like the west coast of Scotland or inshore. The endangered whales feed off plankton grow to around 20m long. The species is slightly smaller than fin whales. The only way to tell the difference is the way water comes out the blow hole, how far the blow hole is from the fin and colouration around the head.
Why do whales get stranded? Stranded whales are generally disorientated through old age and illness. Deep diving whales, that find their way by using sound, can also be disorientated by sonar activity by the Navy. Whales can also be trapped in lochs and other inland waters by the tides.
Recent strandings: There have only been nine sightings of sei whales in the past 50 years around Britain. However there was a sighting off Mull just before the specimen was found in South Uist. Also a sei whale recently washed up in Yorkshire on the Humber. A pod of 60 pilot whales became trapped in a loch off the coast of South Uist this May. Every year, between 350 and 800 whales, dolphins and porpoises (collectively known as cetaceans) wash up on British shores. Most are dead, but some are still alive. Most strandings are dolphins, porpoises or smaller whales that are usually washed up dead. Some coastal wildlife groups have recorded an increase in sightings of larger whales, but it is unclear whether this is because more people are on the look out.