The midfielder will retire when Germany's Euro 2024 campaign comes to an end.
His contract at Real has now expired and Kroos posted to social media: "Today is officially my last day as a Real Madrid player.
"It's strange, but I will always be one of you. Always grateful."
Kroos and Germany will meet Spain in the Euro quarter-finals.
