The 30-year-old, who led his team to World Cup success on Sunday, has called time on his Germany career after 113 caps, the German Football Federation announced.
The Bayern Munich man made his debut for Die Nationalmannschaft 10 years ago.
He has been captain since 2010, when he benefited from an injury to Michael Ballack to lead the team in in South Africa.
"This was a decision which had matured during last season," Lahm told Sport Bild magazine after winning his ninth trophy in just two years.
As well as the World Cup, he was also won the Bundesliga twice, the DFB-Pokal twice, the Champions League, the UEFA Super Cup, the German Supercup, and the FIFA Club World Cup for Bayern during that time.
German Football Federation (DFB) president Wolfgang Niersbach said he did not try to talk Lahm into chancing his mind.
"Philipp called me this morning and informed me personally of this step," he said.
"During our talk, I realised very quickly that it would have been pointless trying to talk him out of his decision.
"He was not only an exceptional player for the national team in these 10 years, but was always a role model.
"I have thanked him for everything that he has achieved for the DFB."
Lahm led Germany to the semi-finals of the 2010 World Cup and Euro 2012 before crowning his career at the Maracana with an extra-time win over Argentina.
"Philipp is not only an exceptional player, but he is also a great personality off the field," added DFB general secretary Helmut Sandrock.
"I always found him to be very honest, reliable and fair whenever I spoke with him with the national team."
Lahm wrote an open letter on the DFB website in which he thanked fans for "a wonderful time".
He said he had told Germany coach Joachim Low of his decision on Monday at breakfast.
"I am happy and grateful that the end of my career end with the national team coincides with winning the World Cup in Brazil," he said.
Lahm's Germany and former Bayern team-mate Lukas Podolski paid tribute to him on Twitter.
The Arsenal man said: "Philipp, it was an hour to fight, play and celebrate successes at your side for 10 years with the DFB and three years with Bayern."