The 20-year-old passed a medical in Munich earlier this week and the Bavarian club have now announced that a formal agreement has been reached with Basel and the player, who has signed a four-year contract.
"We are delighted that we have been able to sign Xherdan Shaqiri, one of the most coveted young talents in European football," said Bayern's director of sport Christian Nerlinger.
Bayern coach Jupp Heynckes is looking forward to working with the Switzerland international next season too.
"Xherdan will strengthen our team next season with his intelligence and his dribbling skills," he said.
"I have been watching him for a while now and am convinced that he can become an important player for FC Bayern."
Shaqiri will get a close look of his future employers in just under a fortnight when Basel host Bayern in the last 16 of the Champions League.
The size of the transfer fee has not been disclosed, but the player is believed to have a market value of around 10 million euros.
He had been linked with a move to Manchester United among others.