My career as an active footballer will end this summer after the Euro championship,” 34-year-old Kroos, who won the 2014 World Cup with Germany, said on Instagram.
Before the European Championship, Toni Kroos has a chance to win the Champions League with Real for a fifth time when they face Borussia Dortmund at Wembley on June 1.
He also won the Champions League with Bayern Munich before joining the Spanish giants.
Kroos joined Real in 2014 and quickly formed a formidable midfield partnership with Luka Modric.
In a statement on their website, Real said Kroos “will go down in Real Madrid history as one of our club and international football’s greatest legends”.
Kroos has also won the Liga title four times and won the Bundesliga three times with Bayern.
He announced he was quitting international football in July 2021 but reversed his decision in February after talks with Germany coach Julian Nagelsmann, who persuaded him to play on till the Euro 2024 on home soil.
Toni Kroos, who has racked up 108 caps and 17 goals for Germany, was one of the key players when they won the World Cup in Brazil in 2014 and scored twice when they inflicted a 7-1 defeat on the host nation in the semi-finals.
But four years later he was unable to prevent Germany from crashing out in the group stage in Russia.
He did not play in Germany’s second World Cup group-stage exit in a row at Qatar 2022 but, after making his international return at Nagelsmann’s request, will lead a new-look Germany side at Euro 2024.
“My ambition was always to finish my career at the peak of my performance level,” Kroos said on Instagram.
“I am happy and proud that in my mind I found the right timing for my decision and that I could choose it on my own.”