Bayern broke the news via their official Twitter account, declaring: "Official: #FCBayern have signed Robert Lewandowski (25)! The striker has signed a 5-year contract until 2019."
The 25-year-old has scored 81 goals in 146 games for Borussia Dortmund, including 15 in 23 this season, since joining from Lech Poznan.
Dortmund could have sold Lewandowski last summer to Bayern, the side who beat them in the UEFA Champions League final, but opted to keep the Poland international.
Earlier on Saturday, German newspaper Abendzeitung printed pictures of Lewandowski and his representatives arriving at the premises of Bayern's club doctor, Dr Hans-Wilhelm Müller-Wohlfahrt that morning.
The deal to take the player to the Allianz Arena is believed to be worth 11m Euros-a-year.
Lewandowski is the second high-profile player to leave Dortmund to join Bayern in the space of a year after midfielder Mario Goetze made the switch for a fee believed to be 37m Euros last summer.
Bayern chairman Karl-Heinz Rummenigge was delighted with the deal, saying on his club'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."
Dortmund are currently fourth in the Bundesliga table, 12 points behind leaders Bayern, who have played a game less.