Following a scoreless first half, Vinicius Jr put Real ahead 10 minutes after the restart, finishing a ball from Karim Benzema.
Benzema, who scored a hat-trick in Real Madrid’s 3-1 win against Paris Saint-Germain to earn a 3-2 aggregate victory in the Champions League last 16, then scored twice himself.
After Vinicius was fouled, he converted a penalty and headed in a third.
Mallorca came close to grabbing the lead when it was 0-0, but Pablo Maffeo’s attempt hit the post.
Real Madrid leads Sevilla by ten points with ten La Liga games remaining for both teams, with arch-rivals Barcelona and Atletico Madrid a further five points back in third and fourth place, respectively.
Real Madrid hosts Barcelona in El Clasico on Sunday at the Bernabeu.
Atletico, who play Manchester United in the second leg of their Champions League last-16 encounter on Tuesday at Old Trafford following a 1-1 draw in Spain, won the Spanish crown last season, finishing two points ahead of Real.