Dele Alli turned home from close range after Kieran Trippier’s cross to put the hosts ahead on 28 minutes, and Alli scored again after the break (56) as his shot deflected off Sergio Ramos and wrong-footed Kiko Casilla.
Wembley erupted again just nine minutes later as Spurs broke through Alli and Harry Kane, who teed the ball up for Christian Eriksen to finish off for 3-0.
Cristiano Ronaldo’s drilled finish from close range made it interesting (80), but it ended 3-1 as Real suffered their first group-stage defeat in the Champions League since October 2012.
Spurs took the lead during a breathless first half through Alli, who had returned to European action following his red card in the Europa League last season.
Trippier was just in an offside position as he ran onto Harry Winks’ fine lofted ball behind Marcelo, but the flag stayed down as the right-back’s first-time centre was bundled home by Alli inside the six-yard box.
Harry Kane returned from injury to start, while Dele Alli was also back from a three-game European suspension picked up last season. Serge Aurier was replaced by Kieran Trippier in defence, while Davinson Sanchez came in for Moussa Sissoko. For Real, Nacho replaced Raphael Varane in defence.
Real Madrid woke up and produced wave after wave of attack before the break, but Spurs had the best chance to score the second through Kane, who saw a shot from 10 yards blocked brilliantly by Sergio Ramos.
The game continued with the same pace in the second half; Hugo Lloris brilliantly tipped away Marcelo’s drilled cross, but Alli made it 2-0 as his effort from the edge of the box deflected off the Ramos and into the net.
Real should have levelled as Spurs cleared off the line twice following pinball in the six-yard box, but a quick breakaway saw the hosts tear the European champions apart again.
Alli won the ball in midfield, found Kane with Spurs two versus two, and then produced a fine through ball for Eriksen to finish past Casilla as Wembley went wild.
Alli missed a clear chance for his hat-trick, glancing a free header wide, but Ronaldo made for a nervy ending with a low finish from eight yards past Lloris.