The 35-year-old will hang up his boots having won the 2010 World Cup and 2008 and 2012 European titles.
Bayern play Real at Munich's Allianz Arena in a plum first-leg clash with the return on April 18 -- Alonso's last appearance at Madrid's Bernabeu, where he spent five seasons from 2009-14, before he retires in June.
The 35-year-old will hang up his boots having won the 2010 World Cup and 2008 and 2012 European titles in 114 appearances for Spain.
The defensive midfielder has a reputation for being ice-cool under pressure, leading one German newspaper to dub him: "a god of simple things, with the serenity of a Zen master."
But the charismatic Basque is bidding to finish his professional career by making history and winning the Champions League with three different clubs having lifted the trophy with Liverpool in 2005 and Real in 2014.
No other player has won the Champions League three times with three different clubs.
Clarence Seedorf is the only player to have won the trophy three times, but he did it with two clubs -- Real in 1998 and then at AC Milan in 2003 and 2007.
And if Bayern have their way, Cardiff's Principality Stadium, which hosts the 2017 Champions League final, will be where Alonso makes his final professional appearance, but first they must squeeze past Real.
"Wow! It will be a great quarter-final between two historic clubs," Alonso said when the quarter-final draw was made.
"For me, of course this is a special game. I'm glad to be able to play in Madrid again, but I also know the Bernabeu is always a difficult place to go."
Three years ago, Real beat Atletico Madrid to win the Champions League final 4-1 in Lisbon.
Current Bayern coach Carlo Ancelotti led Real to their tenth Champions League title with Alonso, who was suspended for the 2014 final, urging his side on before joining Bayern for 2014/15.
Alonso is in the late autumn of his career, but is first-choice under Ancelotti.
His lack of pace has seen him accused of slowing Bayern's game down going forward, but he has produced countless 40-metre passes to quickly turn defence into attack this season.
He was again rock-solid alongside Chile's Arturo Vidal in Saturday's 4-1 thrashing of Borussia Dortmund, keeping things tight in the midfield as Robert Lewandowski, Arjen Robben and Franck Ribery grabbed the goals.
Alonso showed his touch in the build-up for Robben's goal on 49 minutes which left Bayern 3-1 up before Lewandowski converted a late penalty.
The Spaniard is bidding to bow out with his third Bundesliga title in as many years.
He has already collected a German Cup winners medal after last season's final win on penalties over Dortmund, Bayern's semi-final opponents later this month.
The march of time seems to have had little affect on the robust Basque who rarely misses a game through injury, but Ancelotti knows when to keep him back to be fresh for the big occasion.
Alonso sat out the 3-0 win away to Cologne at the start of March to be fresh for the 5-1 thrashing of Arsenal away in the last 16 of the Champions League three days later.
He announced his retirement in March on Twitter in melancholy style, writing: "Lived it. Loved it. Farewell beautiful game" over a black-and-white photo of him walking away, boots in hand.
Such is Alonso's stature in Munich that pundits have suggested he could end up filling the director of sports role vacant since last April when Matthias Sammer resigned through ill health.
But first there is the small matter of Bayern's attempt to farewell both Alonso and club captain Philipp Lahm, who also retires in June, with the treble of European, Bundesliga and German Cup titles.