Rodrygo gave the visitors an early lead before Kevin De Bruyne hit back for the holders to leave the match level at 1-1 on the night and 4-4 on aggregate. However, City's defence of the competition came to an end after Bernardo Silva and Mateo Kovacic saw spot-kicks saved by Madrid's unlikely hero Andriy Lunin.
The Ukrainian, who has deputised this season for the injured Thibaut Courtois, had been at fault for City's early opener in a thrilling first leg but more than made amends. City had not lost at home in the Champions League since 2018 but the holders were held at bay by a heroic defensive effort by the 14-time European champions despite having 34 attempts on goal.
Rudiger's error made De Bruyne get City's 1-1. Nevertheless the German defender was still to have the decisive say as he slotted in the final penalty of the shootout.