"Bayer 04 and Gerardo Seoane go their separate ways. World and European Champion Xabi Alonso becomes new head coach of the Werkself," the team wrote on Twitter.
"I know Leverkusen as an excellent club from my time in Germany. Bayer 04 has always had great players, I also see a lot of quality in the current squad. This task excites me a lot," said the 40-year-old new coach.
Alonso played for Real Madrid, Liverpool, Real Sociedad and Bayern Munich, as well as the Spanish national team, where he won the 2010 FIFA World Cup.
He was a midfielder when Spain secured the EURO 2008 and 2012 titles.
Alonso won the UEFA Champions League twice -- 2005 with Liverpool and 2014 with Real Madrid.
He won local titles with Real Madrid in Spain and, in Germany with Bayern Munich.