At the club's unveiling of new defender Mehdi Benatia, Bayern said that terms had already been agreed with Alonso and that they were in 'friendly discussions' with Real Madrid over a transfer fee with media reports suggesting the final fee would be around €6.5m (£5.2m)
Bayern finance chief Jan-Christian Dreesen and Matthias Sammer told reporters terms had "basically" been agreed and the player would arrive later on Thursday for a medical.
"We have basically agreed terms with Xabi Alonso. He will arrive today for his medical," Dreesen said. "We are in friendly talks with Real and am confident that in one or two days there will be agreement with Real as well."
He said, however, Bayern were eager to sign him rather than take him on loan with Alonso's contract running out in 2016.
The transfer of Alonso, who will be Bayern's fifth Spanish player along with Pepe Reina, Juan Bernat, Thiago Alcantara and Martinez, comes just one day after the club signed central defender Benatia from AS Roma for a reported 25 million euros.
Alonso, 32, retired from international football on Wednesday and within hours was linked with the Bundesliga champions.
The former Spain international - who has won the World Cup, two European Championships, two Champions Leagues and the Liga title - has made 236 appearances for Real Madrid, who he joined from Liverpool in 2009.
Bayern are looking for short-term cover for central midfielders Javi Martinez and Thiago Alcantra, with both Spaniards in different stages of recovery from serious knee injuries.
"This is purely sporting decision because Alonso can instantly help us and boost our quality," Bayern sports director Matthias Sammer said. "He can play top level football for at least two more years."
Real seem happy to let Alonso leave for the club managed by former Barca boss Pep Guardiola, with Bayern prepared to offer the Spaniard an annual salary of €10 million.
Xabi Alonso (l) and Angel Di Maria (r) try to stop Lionel Messi (c)
On the surface of things, this is a deal that makes sense for both teams. Bayern need short-term cover this season because of the injuries to Martinez and Thiago, who are the long-term future of their midfield. Real, meanwhile, would not stand in the way of a 32-year-old who has spent five excellent years at the club.
Scratching beneath the surface though and it seems like a bad idea from Real, who are slipping back into that habit of offloading their less glamorous but tactically essential players in favour of shirt-selling megastars.
Alonso and Di Maria were Real's engine room: the former dictated the tempo of their play, while the latter was the team's beating heart. James Rodriguez and Toni Kroos are trendy young gunslingers fresh from World Cup heroics, but Real fell behind Barcelona when they elected to favour Galacticos over a natural team balance.
Sami Khedira could also leave, which would leave Los Merengues lacking steel and drive in midfield, particularly with Barcelona spending big before their transfer ban kicks in. Maybe Madrid have someone else in mind - perhaps they are putting their trust in Asier Illarramendi, who is yet to convince. But flogging three experienced midfielders seems a tad risky.
- Sports & Recreation
- Xabi Alonso
- Real Madrid
- Matthias Sammer