The Real Madrid midfielder, 31, made the announcement having played in Tuesday’s 2-0 last-16 defeat to England at Wembley.
Kroos won the first of his 106 caps in 2010 and was part of the Germany side that lifted the 2014 World Cup.
“I have played 106 times for Germany. There will not be another time,” Kroos wrote on Twitter.
“I had already made the decision to retire after this tournament for some time. It had been clear to me for a while that I will not be available for the World Cup 2022 in Qatar.”
Kroos said he now wanted to “focus fully on my goals with Real Madrid for the next few years” as well as spending more time with his family.
In addition to the World Cup triumph, Kroos was part of the Germany teams that finished third at the 2010 World Cup and reached the semi-finals of Euro 2012.
He began his club career at Bayern Munich in 2007, making more than 200 appearances for the Bundesliga side before joining Real Madrid in 2014.