The 20-year-old Shaqiri will join Bayern this summer on a contract through the 2015-16 season. He debuted for Basel in 2009, and helped lead the squad to the last 16 of the Champions League this season, where it will face Bayern.
"Xherdan's intelligent play and dribbling skill will add to our team's strength next season," Bayern coach Jupp Heynckes said. "I've been observing him for a while now, and I'm convinced he can become a very important player for FC Bayern."
Shaqiri debuted for Switzerland and has played 17 times and scored four goals. Although the transfer fee was not officially announced, various reports have put the number at around $15 million.
After leading Basel through the group stage of the Champions League with a win over Manchester United, Shaqiri was coveted by most of Europe's top clubs.