The 35-year-old Spanish maestro, who has been with the record German champions since 2014, explained his decision to FC Bayern.tv on Thursday.
"It wasn't an easy decision to make, but I believe it's the right time. I always thought it would be better to quit sooner rather than later. I wanted to end my career still at the highest level, and Bayern is the highest level. I'm incredibly proud and happy to play for Bayern and to be a part of this family."
Having started his career at Real Sociedad in the early 2000s, Alonso rose to prominence during five seasons with Liverpool, helping the English club secure the UEFA Champions League title in 2005. He won the competition again with Real Madrid in 2014, as well as the Spanish Liga title in 2012.
He continued adding to his already well-stocked trophy cabinet when he joined Bayern in August 2014, helping the Bavarians to secure back-to-back Bundesliga titles and last season's DFB Cup.
"FC Bayern would like to thank a great player and person for representing FC Bayern to such a high standard both on and off the pitch, said Bayern CEO Karl-Heinz Rummenigge. "Xabi Alonso is one of the greats of world football. He has won everything there is to win during his career. He's a thoroughly amazing person, and a gentleman of the game."
Lived it. Loved it.— Xabi Alonso (@XabiAlonso) March 9, 2017
Farewell beautiful game. pic.twitter.com/1aSN7GGNzZ
Alonso was also a key member of Spain's all-conquering national team of the late 2000s, winning back-to-back UEFA European Championships in 2008 and 2012, and the FIFA World Cup in 2010.
"I've experienced so much as a player with Real Sociedad, Liverpool, Real Madrid and Bayern Munich," Alonso said. "They are all great clubs. And of course, with the Spanish national team. I never would've thought I'd have such a great career, and I hope there is more to come before it ends."
Indeed, there is every chance that Alonso will get his hands on more silverware before hanging up his boots. Bayern are seven points clear at the top of the Bundesliga, into the quarter-finals of the Champions League (after a 10-2 annihilation of Arsenal), and up against Borussia Dortmund or Sportfreunde Lotte in the semi-finals of the DFB Cup. Another remarkable treble would be the perfect way for one of European football's true greats to round out his glittering career.