Madrid squandered a 2-0 lead given to them by Gonzalo Higuain and Michael Essien as Osasuna rallied with second-half goals from Roberto Torres and Alvaro Cejudo, but Karim Benzema and Jose Callejon scored late on to end the season with victory.
Opinion on Mourinho's legacy at the club would appear to be split among the Madrid faithful, with one section of the stadium singing the coach's name throughout the match, while other sections of the ground did their best to drown them out with boos and whistles.
The Navarrans began the game well, and had the first proper attempt on goal, Joseba Llorente heading a cross towards the bottom corner and forcing a good save from Jesus.
Higuain gave Madrid the lead after 34 minutes, beating the offside trap to get onto a through ball from Essien and then planting a shot in the bottom corner, scoring what many expect to be his last goal for the club after a six-year stint.
The second arrived just a few minutes later. Essien header a corner from Mesut Ozil down into the bottom corner at the near post, and then ran to embrace Mourinho, who previously managed him at Chelsea.
Roberto Torres pulled one back for Osasuna seven minutes into the second half, cutting inside from the left-hand side of the area and hitting a powerful shot into the bottom corner.
Callejon should have restored Madrid's advantage just moments later, but his shot did not have enough power on it and Osasuna goalkeeper Asier Riesgo pushed it away.
Osasuna then completed their comeback, Cejudo arriving at the far post ahead of Nacho to head past Jesus.
Benzema restored Madrid's lead after 69 minutes, controlling a pass from Ozil and then smashing his shot into the far corner.
The Frenchman soon had the ball in the net again but his effort was ruled offside, before Callejon secured the points, finishing off a classic Madrid counter-attack created by Higuain and Benzema.
At the final whistle there would be no lap of honour from the Madrid players or the departing coach, who waved towards the loyal Ultras Sur in the South stand before taking his leave.