Lewandowski had announced his intention to quit the Westfalenstadion once his contract expires at the end of the season, and has been continually linked with domestic and European champions Bayern.
The Bavarian giants confirmed they had reached an agreement with the Poland international, who has put pen to paper on a five-year deal from July 1, 2014.
A statement on Bayern's Twitter feed said: "#FCBayern have signed Robert Lewandowski (25)! The striker has signed a 5-year contract until 2019."
Lewandowski was also rumoured to be coveted by several Premier League clubs including Chelsea and Manchester United but Bayern have won the race for the 25-year-old's signature.
Boss Pep Guardiola attempted to lure Lewandowski to the Allianz Arena soon after taking charge last summer but Dortmund refused to sell their prize asset so soon after losing talented midfielder Mario Gotze to Bayern.
Yet Lewandowski hinted his long-term future lay away from Dortmund and it comes as little surprise that he has chosen Bayern as his next club.
Chairman Karl-Heinz Rummenigge was delighted with the deal, saying on Bayern's official website: "We are very pleased that this transfer is successful.
"Robert Lewandowski is one of the world's best strikers, he will strengthen the squad of FC Bayern and give us a boost.
"We are very pleased that today, from both sides, a five-year contract was signed until 2019."
Lewandowski has scored 65 times in 115 Bundesliga appearances after moving to Dortmund from Lech Poznan in June 2010 for a fee that was reported to be worth 4.5million euros.
He is the joint top-scorer in the league this season with 11 goals, the same as Hertha Berlin striker Adrian Ramos, yet Dortmund are 12 points adrift of Bayern, who also have a game in hand, which may have strengthened Lewandowski's resolve.
The Warsaw man's deal brings into question the future of Bayern forward Mario Mandzukic, who has been linked with a move to Juventus.
However, earlier this week, his representative saw no reason why Mandzukic would want to leave the club.
"Mandzukic is focusing on Bayern Munich and after the end of this season, he still has two years on his contract and he is happy in Munich," Ivan Cvjetkovic told Italy's Tuttosport newspaper.