"After 131 national team games and 45 goals, I am saying goodbye," Muller said in a video statement announcing his decision.
Muller, who turns 35 in September, was a key member of the German team that won the 2014 World Cup, beating Argentina in the final after extra time.
"When I played my first international match for the German national team over 14 years ago, I could never have dreamed of all this," Muller said in the video.
"Great victories and bitter defeats. Sometimes on the floor, only to get back up again," he said.
"It always made me very proud to play for my country. We celebrated together and sometimes shed a tear together."
Germany's 2-1 loss to Spain in the quarter-finals of Euro 2024 will go down as Muller's last game for the national team.
A late extra-time goal by Spain's Mikel Merino dashed Germany's hopes of winning the tournament on home soil.
A tearful Muller hinted after the game that he had played his last game for Germany.
Muller said he would hold talks with national team coach Julian Nagelsmann and decide whether it was the "sensible option" to step aside in favour of younger players.
'Unorthodox... unpredictable'
Following Muller's announcement, Nagelsmann lauded his qualities as a player, adding that the German team would "miss him very much".
"Nobody is like Thomas Muller," said Rudi Voller, the Germany national team director and a prolific striker in his own right.
"His value to German football cannot be overestimated," Voller said in a statement.
Muller was "unorthodox, intuitive, unpredictable and that is precisely why (he) is successful", Voller said.
Muller won the Golden Boot at the 2010 World Cup in his debut year with the national team, scoring five goals at the tournament in South Africa.
The charismatic striker also scored the opening goal in Germany's famous 7-1 victory over the hosts Brazil in the 2014 World Cup on their way to lifting the title.
Of the players to have won the World Cup with Germany that year, only goalkeeper Manuel Neuer is still involved in the national team set-up.
Germany and Real Madrid midfielder Toni Kroos announced before Euro 2024 that he would retire from football after the tournament.
Unlike Kroos, Muller will continue to play for his club Bayern Munich, where he is under contract until 2025.
Goal machine
"The younger generation doesn't know the national team without Thomas Muller and I can't really imagine it without him," Bayern president Herbert Hainer said in a statement.
"I'm delighted that Thomas will continue to play for our club."
With 131 appearances under Muller's belt, only Lothar Matthaeus and Miroslav Klose have played more games for Germany.
Muller also ranks sixth on Germany's all-time scoring list behind Klose and Voeller, among others, and level with Karl-Heinz Rummenigge.
"His achievements and his titles speak for themselves," German Football Association president Bernd Neuendorf said in a statement.
"With his goals and his ingenuity, he played a key role in shaping one of the most successful periods in the history of our national team," Neuendorf said.
In his goodbye message, Muller called on fans to "keep your fingers crossed for the team on the way to the 2026 World Cup".
"I'm doing that too. Now as a fan in the stands and no longer as a player on the pitch."