Eden Hazard was handed a first start since the 2-1 loss to Levante at the end of January, while Antonio Blanco made his second start for his boyhood club.
A positive start to the game saw Real Madrid go close through Karim Benzema, Hazard and Militao but Osasuna goalkeeper Sergio Herrera was up to the task with everything thrown at him.
The visitors put the ball in the back of the net on the stroke of halftime but the goal was ruled out for offside.
Real Madrid struggled to raise their tempo and lacked the requisite precision in the second half with a resolute Osasuna defense keeping them at bay.
Zidane rang the changes just past the hour mark, with Rodrygo, Miguel Gutierrez and Isco all coming on.
Rodrygo shot narrowly wide shortly after his introduction before Real Madrid scored the opener in the 76th minute.
A contentious corner kick was awarded to Los Blancos, from which Militao rose highest to head home from Isco's delivery.
Their lead was doubled just four minutes later. Karim Benzema picked up the ball at the halfway line and dribbled across the Osasuna defense before laying the ball on for Casemiro.
The Brazil international miscontrolled the pass but that allowed him to side-step Herrera and the ball trickled into the back of the Osasuna net.
Real Madrid had a golden opportunity for a third goal but Isco somehow shot wide from six yards.
The win sees Los Blancos close the gap on city rivals Atletico Madrid back to two points and would give them a much-needed boost ahead of their marquee clash with Chelsea on Wednesday.
Here are five talking points from the game.
#5 Real Madrid keep title hopes alive
Atletico Madrid hung on for dear life in their 1-0 victory over Elche, which temporarily took them five points clear at the top.
Real Madrid came into this game knowing that anything other than a win would have jeopardized their quest to retain the league title.
Having played out a tepid goalless draw with Real Betis last time out, the defending champions looked on their way to another stalemate but a late surge saw them pick up all three points.
Real Madrid were far from their best against Osasuna and struggled to create chances for most of the game.
However, Zidane's men have constantly shown an ability to get the job done despite not playing at an optimum and that proved to be the case once again.
The victory takes Real Madrid to within two points of Atletico. With the table-toppers set to clash with Barcelona next week, one or both of Real Madrid's title rivals are bound to drop points, leaving a window of opportunity for the defending champions.
In light of this, the hard-fought victory against Osasuna did Real Madrid's title hopes a world of good.
#4 Mixed performance from Eden Hazard
It is no secret that Eden Hazard's transfer to Real Madrid has not been the hit that many predicted.
Almost two years on from his nine-figure arrival, the Belgium international has yet to make a genuine mark, with injuries largely taking a toll on his displays.
The former Chelsea man made his first start for Los Blancos in almost three months and was bright in the early periods of the game, combining well with Benzema and showing his technique on occasion.
He had a pristine opportunity to open the scoring midway through the first half but his scoffed shot saw Herrera tip over the bar. The 30-year-old should unarguably have done better and a pristine Hazard would undoubtedly have buried the ball in the back of the net from such close range.
The second half was a more subdued affair for him, as he struggled to make any sort of impact or penetration and was also let down by poor touches in the final third.
It came as no surprise to see Hazard substituted in the 64th minute but with a marquee return fixture against his former side coming up, the stage is perfect for Hazard to showcase why Real Madrid broke the bank to sign him.