Zinedine Zidane left stars including Cristiano Ronaldo and Gareth Bale out of his squad after Madrid survived a dramatic fightback by Juventus in midweek, with Marcelo and Toni Kroos named on the bench.
But despite the changes made by the Frenchman, Madrid eased to a fifth consecutive away victory in all competitions thanks to a sublime showing from the increasingly influential Isco.
A fine free-kick from the playmaker that curled away from Roberto Jimenez was the 25th set-piece goal scored by Madrid, more than any LaLiga club this season, giving Zidane's men a first-half lead.
Isco then teed up Casemiro to slot home the decisive second after the break for the visitors, who won the title on their visit to La Rosaleda last season, Madrid moving above Valencia into third place in the table despite Diego Rolan's 93rd-minute consolation.
Malaga had opportunities to rescue an unlikely draw before Casemiro's goal, Manuel Iturra guilty of wasting a fine one-on-one chance, but Madrid closed out victory to leave Jose Gonzalez's men - 14 points adrift of safety with six games to go - on the brink of dropping out of the top flight.
Karim Benzema, given extra responsibility in the absence of Ronaldo and Bale, fired a pair of early efforts off target as Madrid sought a fast start.
Isco's superb chipped throughball sent Lucas Vazquez through on goal in the 23rd minute but he snatched at a rushed finish, smashing the ball well over the crossbar.
Benzema nodded a free header wide at the back post from Casemiro's deep cross, but Isco gave Madrid the lead with a superb free-kick against his old club in the 29th minute.
The set-piece, central and 25 yards out, was in a perfect position and Isco whipped the ball over the wall and beyond the despairing dive of goalkeeper Jimenez, the Spain international opting not to celebrate and being rewarded with warm applause from the home fans.
Roberto Rosales hit a free-kick just over the crossbar and sloppy Madrid play led to a great chance for the hosts just before the break as Casemiro was robbed by Iturra, but the midfielder fired into the legs of Keylor Navas.
Malaga started the second half with increased confidence but an off-target Alberto Bueno header was the closest they came to levelling the scores.
Perhaps inevitably, Madrid then killed the game off with a clinical 63rd-minute attack, with Isco - who left Malaga for Madrid in 2013 - at the heart of the move again.
Benzema's good work put Isco into the box and, despite being given a clear sight of goal, he unselfishly squared for Casemiro to roll in his fifth LaLiga goal of the season.
Although Malaga were thereafter playing for pride - Isco having departed to a standing ovation - substitute Maxime Lestienne whipped a sharp strike narrowly wide of Navas' right-hand post with 10 minutes to go.
And Rolan gave the home fans something to cheer with the last kick of the game, taking advantage of poor defending from Jesus Vallejo to slam in a close-range finish.
Key Opta stats:
- Real Madrid have won their 100th game under Zinedine Zidane in all competitions (71.4 per cent of wins, 100 out of 140 games).
- Madrid have scored 25 goals from set-pieces, more than any other team in LaLiga this season
- Isco scored and assisted in the same game for Madrid for the first time this season in all competitions.