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 Portuguese coach named an eye-catching starting 11, giving goalkeeper Jesus Fernandez his first appearance of the season, as first-choice Diego Lopez was missing due to undergoing an ear operation.
Club captain Iker Casillas was again left out of the squad entirely despite being fit, while Cristiano Ronaldo, Xabi Alonso and Sergio Ramos were all missing through injury, leaving room for Omar Mascarell and Diego Llorente to make their debuts off the bench.
Osasuna were also fielding an under-strength side, and also had little to play for, having secured survival last weekend.
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.
Cejudo then beat the offside trap and was one-on-one with Jesus but shot over, and a few moments later David Timor shot straight at the Madrid goalkeeper, who caught the ball easily.
Luka Modric had Madrid's first clear attempt, but his shot was blocked superbly by Ruben Gonzalez.
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.