After a cagey first half, the hosts capitalised on a protecting mix-up between Rodri and Nicolas Otamendi to take the lead as the remarkable Vinicius Junior raced towards goal before neatly squaring for Isco to slot home.
Sergio Ramos shot over as Real Madrid appeared to double their advantage but City equalised 12 minutes before time when Jesus nodded in from close range.
It was once the least City deserved for what had been an awesome away overall performance by Pep Guardiola’s side and matters got even higher seven minutes from time when substitute Raheem Sterling was brought down inside the box and De Bruyne stepped home to confidently convert from the spot.
It got even worse for Real Madrid when they had been reduced to 10 men with five minutes remaining. Sergio Ramos brought down Jesus as he ran through on goal and the defender was shown a red card.
It was the first time City had beaten Real Madrid in the Champions League and means they are in the riding seat before the 2nd leg at the Etihad subsequent month.