Mid-table side Mallorca got off to the perfect start when Emilio Nsue fired a shot into the corner of the net in the very first minute.
Mallorca then fired in two quick goals just after the break to wrap up the points.
Gonzalo Castro blasted home a shot from inside the area in the 47th minute and the points were sealed in the 53rd minute when Alejandro Alfaro converted from close-range.
Mallorca move up to 12th place with the win and are now 12 points clear of the relegation zone.
Racing are rooted to the bottom of the table though and look doomed with just six games remaining.
The Islanders have another away test on Sunday when they travel to face Athletic Bilbao while Racing Santander are also away at improving Villarreal.