The Bundesliga giants have revealed that they have reached an agreement with Basel and the young winger, who will move to the Allianz Arena at the end of the season
The Bavarians had long been in the market for attacking reinforcements, and were previously believed to be interested in signing Borussia Monchengladbach star Marco Reus.
However, they turned their attention to Shaqiri after Reus made the decision to join Borussia Dortmund at the end of the 2011-12 campaign.
The 20-year-old Shaqiri travelled to Germany earlier this week to undergo his medical, and the winger has now signed a deal until June 2016.
"We are very pleased that we have managed to sign one of the most sought after youngsters around in Europe in Xherdan Shaqiri," commented Bayern sporting director Christian Nerlinger.
Shaqiri is a product of the Basel youth academy, and had developed into a key player at the Swiss outfit since making his official debut in July 2009.
The winger will get the chance to play against his new team when both sides meet in the first leg of their Champions League round of 16 tie on February 22.