Match ends, Málaga 1, Real Madrid 2.
Cristiano Ronaldo inspired Real Madrid to a club-record 16th consecutive victory in all competitions.
The Portugal forward crossed for Karim Benzema to put Carlo Ancelotti's team ahead with a prodded finish at the near post.
Ronaldo then flicked a header on for Gareth Bale to seal the victory with a firm finish on the break.
Real's Isco was sent off for a second booking before Roque Santa Cruz headed in a late consolation goal.
The victory sees Ancelotti better the 15-match sequences achieved by Jose Mourinho in 2011 and Miguel Munoz in 1961.
Ronaldo, 29, has played an integral role in Real's recent run and he took his tally of assists to eight for the season to help end Malaga's unbeaten home record.
Real have reacted "with surprise" to suggestions made by Uefa president Michel Platini that Ronaldo does not deserve to retain the Ballon d'Or.
Platini has said the honour should go to a member of Germany's World Cup winning squad and Ronaldo played as if to prove a point.
Only a fine performance by Carlos Kameni in the Malaga goal prevented Ronaldo from having more assists and goal to show for his efforts.
Bale's low ball across the face of goal found Ronaldo but Kameni reacted to beat away the firm first-time shot but Malaga did not stay level for long.
Ronaldo made progress down the left with a succession of stepovers and his left-foot cross was met by Benzema at the near post for his eighth league goal of the season. Malaga felt Benzema had gained an advantage by pulling Weligton out of position immediately before the goal.
Malaga twice went close with long-range shots just before half-time.
Sergi Darder's volley slipped through Iker Casillas's grasp and went narrowly wide before Duda's free-kick clipped the crossbar with goalkeeper well beaten.
Malaga were indebted to Kameni again with 14 minutes remaining when he dived low to his right to save superbly from Ronaldo after the Malaga defence failed to cut out Bale's ball in from the left.
Real were beginning to look nervy in the closing stages but Bale settled the nerves by adding a second goal at the end of a searing counter-attack.
Ronaldo flicked on Marcelo's long pass from the back and Kameni had no chance of saving Bale's fierce right-foot shot.
Real were forced to hold on for the victory with 10 men when Isco was dismissed against his former club following a second yellow card with four minutes left.
Malaga took advantage of the extra body when Santa Cruz met Arthur Boka's cross from the left but it came too late to make a difference for the hosts.
- 21SánchezSubstituted forAngeleriat 67'minutes
- 3Pena de OliveiraBooked at 90mins
- 30DarderBooked at 30mins
- 14García del PozoSubstituted forAñor Acostaat 78'minutes
- 7García Sánchez
- 17Barbosa ValenteSubstituted forda Luz Hortaat 65'minutes
- 29Castillejo Azuaga
- 9Santa Cruz
- 10da Luz Horta
- 22Romero Alconchel
- 28Añor Acosta
- 15CarvajalSubstituted forVaraneat 85'minutes
- 12MarceloBooked at 80mins
- 23IscoBooked at 86mins
- 8KroosBooked at 43mins
- 11BaleSubstituted forHernándezat 89'minutes
- 9BenzemaSubstituted forIllarramendiat 73'minutes
- 7Cristiano Ronaldo
- 5da Silva Coentrão
- Iñaki Vicandi Garrido
- Shots on Target
Second Half ends, Málaga 1, Real Madrid 2.
Weligton (Málaga) is shown the yellow card for a bad foul.
James Rodríguez (Real Madrid) wins a free kick in the defensive half.
Foul by Weligton (Málaga).
Goal! Málaga 1, Real Madrid 2. Roque Santa Cruz (Málaga) header from the centre of the box to the top right corner. Assisted by Arthur Boka with a cross.
Corner, Málaga. Conceded by Marcelo.
Substitution, Real Madrid. Javier Hernández replaces Gareth Bale.
Attempt blocked. Arthur Boka (Málaga) left footed shot from outside the box is blocked.
Attempt missed. Cristiano Ronaldo (Real Madrid) left footed shot from the left side of the box misses to the right.
Attempt missed. Marcos Angeleri (Málaga) right footed shot from very close range is too high following a set piece situation.
Attempt saved. Juanpi (Málaga) left footed shot from outside the box is saved in the bottom right corner.
Second yellow card to Isco (Real Madrid) for a bad foul.
Foul by Isco (Real Madrid).
Samu Castillejo (Málaga) wins a free kick in the attacking half.
Substitution, Real Madrid. Raphael Varane replaces Daniel Carvajal.
Goal! Málaga 0, Real Madrid 2. Gareth Bale (Real Madrid) right footed shot from the right side of the box to the high centre of the goal. Assisted by Cristiano Ronaldo with a headed pass following a fast break.
Attempt missed. Gareth Bale (Real Madrid) header from the centre of the box is too high. Assisted by Isco.
Attempt blocked. Gareth Bale (Real Madrid) header from the centre of the box is blocked. Assisted by Toni Kroos with a cross.
Corner, Real Madrid. Conceded by Weligton.