Sergio Ramos' first half double was enough for Real Madrid to see off the challenge of Malaga.
Not for the first time in his career, Los Blancos captain Ramos made the difference, rising highest at a corner to power home a header just after the half-hour mark to open the scoring in a 2-1 win.
He then added a second just before the break, sliding in at the back post to divert Toni Kroos' free-kick home.
The scoreline came as a relief to Bernabeu boss Zinedine Zidane, who had seen his team lose twice in the last week against Sevilla and Celta Vigo.
The visitors will have been disappointed to find themselves two goals down after they matched their illustrious opponents for much of the half, only to be undone by two set pieces.
Despite a spirited display, in which they were given hope by Juanpi's strike in the second period, the defeat means they are still looking for their first win under new Coach Marcelo Romero.
Madrid began the better of the two teams, with Cristiano Ronaldo having the game's first clear chance. Having been played through on goal, the Portuguese forward could only steer an effort straight at Malaga keeper Carlos Kameni.
Karim Benzema then flicked wide from Lucas Vazquez' cross when he ought to have done better, before the visitors began to create opportunities of their own.
First, Chory Castro's effort beat Keylor Navas all ends up, only to cannon back off the post. The Costa Rican shot-stopper then had to be alert to make two more saves, including another from Castro, as Malaga threatened a shock lead.
However, Los Blancos reasserted themselves and, despite the disappointment of losing Marcelo to injury, they headed into the interval satisfied at their work.
The second half began in low-key fashion, with the hosts dominating possession. Ronaldo was flagged offside when he would have been in on goal once more, while Navas had to be alert to punch clear as Malaga looked to stage a comeback.
Marcelo Romero's team did halve the deficit on 64 minutes, when Juanpi slammed home a rebound after Navas produced a smart save to deny Juankar.
The Andalusians were gaining in confidence and they could have levelled barely a minute later. Castro's shot had to be kept out by Navas to the alarm of the home fans, who showed their displeasure by whistling at their team's slackness.
With just over 15 minutes remaining, the contest was nearly over in bizarre circumstances. Kameni horribly miscontrolled a back-pass and had to race back to clear the ball off the goal line, but gave it straight to Ronaldo. The keeper, however, atoned for his error by denying the Balon d'Or winner.
A minute later, Ronaldo had another chance to put the game beyond Malaga, but his effort came back off the post. The Portuguese's personal duel with Kameni continued as he unleashed a left-footed attempt, but the shot-stopper was again equal to it.
Malaga tired as the game entered its dying stages and were unable to create any more clear chances to force and equaliser. As it was, Zidane's players saw out a 2-1 win and opened up a four point cushion over Sevilla at the top of the League.
Real Madrid 2-1 Malaga
Sergio Ramos 35, 43 (RM) Juanpi 64 (M)
Real Madrid: Navas, Ramos, Varane, Nacho, Ronaldo, Kroos, Benzema (Morata 78), Marcelo (Isco 25), Casemiro, Lucas V, Modric (Kovacic 78)
Malaga: Kameni, Rosales, Luis Munoz, Mikel, Juankar (Demichelis 73), Camacho, Recio, Fornals, Juanpi, Chory Castro (Jony 67), Penaranda (Santos 79)