It was a tense night as Malaga only needed a 1-0 victory in order to advance on the away goals rule. In a very tactical first half the best chance fell to Sergio Ramos, whose header right before half-time just missed the target.
In the second half Malaga had to come out of their defensive shell more and that created some more scoring opportunities for Real.
The best chance came in the 62nd minute when a header from Cristiano Ronaldo was brilliantly saved by Caballero.
Unfortunately for Caballero, who was brilliant, it was his mistake that gifted Real Madrid their goal. There seemed to danger when Real substitute Karim Benzema fired tamely straight at Caballero. But somehow when the Argentine keeper fell to his knees to collect, the ball squirmed between his legs and rolled over the line.
The goal deflated Malaga who knew that they now needed two goals to qualify, and Real Madrid was able to easily manage the rest of the game.
The only negative was that in the 87th minute, Arbeloa was sent off after 87 minutes after picking up two yellow cards and he will miss this weekends match in Mallorca.
Real will be joined in the quarter-finals by surprise qualifiers Real Mallorca and third division side Mirandes.
Mallorca scored four times in seven minutes during an astonishing comeback to knock out Real Sociedad 6-3 on aggregate earlier in the evening.
Mirandes claimed the scalp of a second La Liga side when they drew 1-1 at Racing Santander to progress 3-1 on aggregate.