"We are delighted to have signed one of Europe's most sought-after talents with Xherdan Shaqiri," said sports director Christian Nerlinger in a statement.
The pint-sized 20-year-old, who will officially join from July 1, signed a deal until 2016.
"Xherdan will strengthen our team from next season with his football intelligence and dribbling", said Bayern coach Jupp Heynckes.
"I have been watching him for some time and I am convinced he can become an important player for the club."
Bayern take on Shairi's Basel in their Champions League round of 16 later this month.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.