Poland striker Lewandowski, who looks set to leave the club after refusing to extend his contract past 2014, became the first player to score four goals in a Champions League semi-final and opened his account after eight minutes.
The 24-year-old added three more in the second half, including an emphatic penalty to leave the nine-times European champions badly wounded.
"We had to force ourselves to remain calm but the return leg in Madrid will not be easy for us," said Dortmund coach Juergen Klopp. "But whatever happens in Madrid no one can take tonight away from us."
Cristiano Ronaldo equalised just before the break for the Spaniards, who face a monumental task against Dortmund, still undefeated in the competition in Tuesday's home leg.
"We lacked commitment, starting with myself and including the 10 others who were on the pitch," Real defender Sergio Ramos told Canal Plus.
"We have to keep faith that we can turn it around in the return leg, there are 90 minutes left. We will come out fighting from the first minute because it's a competition that means a lot to us."
Dortmund, who beat Real at home in the group stage, had hoped the surprise transfer of Mario Goetze to Bayern Munich announced on Tuesday would not distract them.
Klopp had appealed for a great footballing occasion and the 62,000 Dortmund fans, angered by the 20-year-old's decision to join their arch-rivals, showed restraint when he came on to the pitch.
"If you play football you know how to handle this situation," Klopp said. "You cannot be successful and nobody will recognise it. It's normal to see players go."
Goetze soon paid them back, curling a superb cross into the box for Lewandowski to tap in after holding off Real's Pepe for his seventh goal of the Champions League campaign.
It took Real more than 20 minutes to curb their opponents' attacking game and Ronaldo tested goalkeeper Roman Weidenfeller with a stinging long-range free kick.
But they needed a Dortmund mistake to level in the 43rd, seconds after the Germans had demanded a penalty for a challenge on Marco Reus.
Central defender Mats Hummels miscued a back pass and Gonzalo Higuain intercepted before feeding the unmarked Ronaldo who levelled with his 12th goal of the competition.
Ronaldo's goal equalled a record of scoring in six successive Champions League games and left him level with Thierry Henry in fourth place on the Champions League all-time scorers' list with his 50th goal.
But Real's joy was short lived when Lewandowski struck twice in five minutes after the break as Dortmund resumed their domination.
The Pole was picked out by Reus in the 50th minute to score from close range after evading the offside trap and he controlled a Marcel Schmelzer cross to drill in from 10 metres after a superb piece of skill.
He completed a brilliant individual and team performance when he converted a 66th-minute spot-kick with Real looking wildly out of sorts, much like their arch-rivals Barcelona in Munich.
"It was superb performance for almost 90 minutes," said Dortmund sports director Michael Zorc.
"I think it was a deserved win but we still need to be very careful in the return leg. The goal we conceded was our mistake and we brought Real back in the game. But the team corrected it very well."