It was Dortmund's fifth straight win over Bayern, who were at full strength ahead of next Saturday's Champions League final against Chelsea, as they staked an even bigger claim to take over from the Bavarians as Germany's dominant domestic force.
Shinji Kagawa fired Dortmund into a third minute lead after a double defensive blunder by Luiz Gustavo, before Dutchman Arjen Robben levelled with a penalty in front of more than 75,000 fans at Berlin's Olympic stadium.
Mats Hummels' penalty in the 41st minute restored Dortmund's lead and their top scorer Lewandowski struck either side of the break and again after Bayern winger Franck Ribery briefly cut the deficit with a sensational low drive in the 75th.
"We at Dortmund could not have imagined a better final," the club's beaming coach Juergen Klopp said.
Dortmund captain Sebastian Kehl lifted the trophy to mark his side's first German Cup triumph since 1989 as his team mates cheered wildly with German president Joachim Gauck sucked into the celebrations.
"We were ice cold in our execution, scored great goals. It's difficult to put into words what we're feeling at this moment," said Klopp after his first German Cup victory as a coach.
Dortmund, who have now won the Cup three times, also beat Bayern in the race for the league title, earning a record 81 points as they clinched their second successive Bundesliga crown earlier this month.
"We should not be complaining as our overall defensive behaviour was catastrophic," Bayern coach Jupp Heynckes said.
"We have to accept that we did not deserve to win. But now we have a different target in our sights and until the Champions League final we will recover from the shock."
"That will be a completely different game," said Heynckes.
It took Dortmund only three minutes to send their yellow-clad fans into a frenzy when Jakub Blaszczykowski pounced after Gustavo twice gave away possession and cut the ball back to Kagawa, who scored on what could be his last game for Dortmund.
The hugely gifted 23-year-old Japan international, who said he would decide whether to move to the English Premier League after the final, tapped home from close range with Manchester United manager Alex Ferguson watching from the stands.
Dortmund keeper Roman Weidenfeller brought down Mario Gomez in the 24th minute and Robben converted from the spot to make amends for his penalty miss in their league clash last month.
But any hopes of a confidence-boosting result ahead of the Champions League final in Munich were undermined when Bayern reject Hummels scored with a penalty in the 41st after defender Jerome Boateng brought down Marcel Schmelzer.
Lewandowski then struck in first half-stoppage time, picking up a Kagawa pass to beat goalkeeper Manuel Neuer.
The Poland forward, who notched 22 league goals this season, was again on target in the 58th as Dortmund ripped through an error-prone Bayern defence almost at will.
Ribery struck 15 minutes from time after Mario Gomez earlier hit the bar but yet another Bayern mistake, with Neuer dropping the ball in the box, led to Lewandowski's third goal from an easy header for a memorable end to Dortmund's successful season.