The dead 13.8 metre whale was discovered at Portobello beach near the Rockville hotel in Joppa, Edinburgh, at around 7.30am today.
Teams from Police Scotland, the Scottish SPCA, Whale and Dolphin Conservation and British Divers Marine Life Rescue (BDMLR) were at the scene.
Corinne Gordon, a marine mammal medic with BDMLR who examined the whale and took measurements, said it had suffered deep cuts around its mouth and to its dorsal fin.
"It is a 13.8 metre male sperm whale which is not adult that has washed up," she said.
"It has possibly been hit by a boat or propellers and that has caused severe damage. It has been dead for some time.
"It is possible it has been struck out in the deep and then washed inshore."
Arrangements are being made with Edinburgh City Council to lift the carcass from the water tomorrow using a crane.
The whale will be taken to a Scottish Marine Animal Stranding Scheme facility at Dunbar, East Lothian, where an autopsy will be carried out to determine the cause of death.
There was excitement among conservationists last year when a pod of 14 sperm whales was spotted near the Firth of Forth. The animals usually reside in deeper waters off the north and west of Scotland towards the Atlantic, where they hunt squid.
A pod of 26 pilot whales washed up in a beaching further up the east coast in Pittenweem, Fife, in 2012. Ten of the pod survived and were re-floated, but rescuers had to winch the carcasses of 13 whales to the top of cliffs at the Fife beach to dispose of them after they died.