The shark, believed to be eight feet long, sent swimmers racing for shore after it appeared in shallow waters on Cala Major beach, between Magaluf and Palma.
Videos show the shark thrashing in the sand as it struggles to return to open water.
Lifeguards raised red flags to clear holidaymakers out of the sea, before the Guardia Civil conducted a search of the area.
The shark managed to swim back out, but was later spotted in shallow water on a beach along the coast in Can Pastilla.
Crowds watched as it was pulled from the water by lifeguards, before being put down by wildlife experts from nearby Palma Aquarium.
It was said to have approached the packed beaches after sustaining a serious head injury caused by a harpoon.
An aquarium worker said a hook was found inside its mouth “which caused it irreversible damage”.
— Tim Prottey-Jones (@TimProtteyJones) June 24, 2017
The panic prompted the brief closure of the beach. It reopened hours later but lifeguards prevented holidaymakers from swimming too far out.
The sightings came a day after a shark was seen swimming past children on lilos at Illetas beach.
A spokesman for Calvia Council, which covers Illetas, said the shark appeared to be the same one spotted in Cala Major and Can Pastilla.