The Poland international will leave BVB for the reigning German champions once his contract expires this summer.
The 25-year-old had long been linked with a move to the Allianz Arena side and he has now signed a five-year deal with Bayern to complete the transfer.
Clubs such as Real Madrid, Manchester United and Arsenal had also shown an interest in signing the prolific attacker, but he will continue his career in the Bundesliga instead.
Lewandowski was already close to joining Bayern last summer, but the move eventually fell through as Dortmund vetoed to a move to the Bundesliga champions.
The Poland international started his professional career at Znicz Pruszkow and also wore the jersey of Lech Poznan before joining Borussia Dortmund in the summer of 2010.
He had since developed into a key player at BVB, helping the Signal Iduna side to two Bundesliga titles, a DFB Pokal and the DFL-Supercup.
Lewandowski follows in the footsteps of Mario Gotze, who left Dortmund for Bayern ahead of the 2013-14 campaign.