Mallorca’s Lago Junior scored the only goal of the game after just seven minutes when he drove in from the left and fired into the far corner.
Karim Benzema went closest for Madrid when he hit the bar while Alvaro Odriozola saw red late on.
Zinedine Zidane’s now side sit second in La Liga, one point behind Barcelona.
Meanwhile, Mallorca rose to 14th, having sat in the relegation zone before the game.
Zidane named a weakened side in Mallorca as Gareth Bale, Luka Modric and Toni Kroos all missed out through injury while Eden Hazard was unavailable following the birth of his fourth child on Friday night.
Nonetheless, Los Blancos were favourites going into the match, given the fact Mallorca had won consecutive promotions to find themselves in the Spanish top flight this season.
But the hosts’ goalkeeper Manolo Reina was relatively untroubled as Madrid struggled to create chances throughout despite naming a forward-thinking line-up.
Summer signing Luka Jovic partnered Benzema in attack, but the Serbia international’s lean run of form continued and he was substituted midway through the second half – he is yet to open his Los Blancos account.
Meanwhile, an ultra-attacking midfield four of Casemiro, Isco, James Rodriguez and Vinicius Junior failed to prise open a stubborn Mallorca backline, with left-back Fran Gamez performing particularly well up against 19-year-old Vinicius.
And it could have been worse for Zidane’s team as Ante Budimir also had the ball in the net for the hosts during the first half – only to see it correctly ruled out for offside.
Their night then went from bad to worse on 74 minutes as full-back Odriozola was sent off for a second bookable offence following a mindless lunge on goalscorer Lago.
There is little time for reflection on the defeat for Zidane and his team, however, as they face Galatasaray in Istanbul in the Champions League on Tuesday night.