Earlier this summer, the 33-year-old publicly admitted his desire to leave the Bundesliga champions, 12 months ahead of his contract expiry.
The likes of Real Madrid, Manchester United and Chelsea were linked with a move for Lewandowski, although Thomas Tuchel ruled out the possibility of the Blues making a move.
Barcelona have long been considered the frontrunners for Lewandowski's signature, although Bayern chiefs continued to rule out the prospect of the Poland international leaving the club.
However, those upstairs at the Allianz Arena have now relented, and Lewandowski is on his way to Barcelona after a €50m (£42.5m) deal was struck between the two clubs.
"FC Barcelona and Bayern Munich have reached an agreement in principle for the transfer of Robert Lewandowski, dependent on the player passing a medical and contracts being signed," a statement on the Barcelona website read.
"The striker from Poland stands out for his goalscoring abilities. Inside the box he has all the tools to make him a difficult striker to read as he can find the net with his head and both feet with equal precision.
"His technical qualities also mean that he can link up well outside the box also. Lewandowski will bring goals, experience and know-how to the Barça attack."
Barcelona will reportedly pay an upfront fee of €45m (£38.3m) for the former Borussia Dortmund man, who is leaving Bayern after a prolific eight-year spell at the club.
During that time, Lewandowski has won eight consecutive Bundesliga titles, the Champions League, the Club World Cup, the UEFA Super Cup, three DFB Pokals and five German Super Cups.
Lewandowski is reportedly set to sign a four-year deal at Camp Nou, and he has amassed 344 goals in 375 games for Bayern Munich over the past eight years - second only to Gerd Muller in the club's all-time charts.
The striker's exploits in Bavaria have also seen him named the Best FIFA Men's Player on two occasions, and he will compete with the likes of Pierre-Emerick Aubameyang and Ferran Torres in the Barcelona attack.
La Blaugrana have also spent big to bring Raphinha to the club from Leeds United this summer, and a new two-year deal has been agreed with Ousmane Dembele.
Lewandowski's arrival could push Memphis Depay closer to the exit door, and the Dutch attacker is now understood to be on the club's transfer list after just one season in Catalonia.
Depay is due to become a free agent in 2023, and fellow striker Martin Braithwaite is also expected to head for the exit door in the coming weeks.