The young mammal was found dead at Cabo de Palos beach in Murcia, southeastern Spain, on February 27.
Autopsy results, which were released by regional authorities last week, found plastic bags, ropes, cans, and pieces of netting in its stomach and intestines.
The 10-meter long male sperm whale was unusually thin when it washed up in Spain earlier this year. Authorities said it weighed 6.5 tons, or 5,900 kg. Adult male sperm whales can weigh seven times that.
Scientists said it most likely died because of peritonitis, an abdominal inflammation caused by an infection or rupture of the stomach's inner lining.
Another possibility or a digestive failure stemming from the mammal's inability to remove the rubbish from its body. Either way, the made-made trash would have been the cause.
The photo below shows some of the rubbish found inside the whale:
Sperm whales are only supposed to eat squid. Spain considers it a vulnerable species.
According to EcoWatch, there were 50 million metric tonnes (55 tons, or 50,000 kg) of plastic in the world's oceans as of 2015.
This figure is likely to treble by 2025, a UK government report said last month.