The 30-year-old announced his retirement with immediate effect yesterday, but said he knew before flying out to South America in June that it would be his last tournament for Germany whatever the outcome.
"Over the course of last season, I made up my mind that I was going to end my international career after the World Cup," Lahm said in a letter on the German federation website. "I informed Germany coach Joachim Loew of this decision on Monday at breakfast. I'm grateful and thankful that the end of my career coincides with winning the World Cup in Brazil with the national team."
Lahm has brought to an end a decade with the national team. After making his debut in February 2004 against Croatia, Lahm made a total of 113 appearances for his country. He became captain in 2010, prior to the World Cup in South Africa after Michael Ballack was pulled out with an injury that ended his international career. Lahm's own ends in more favourable circumstances.
"There's hardly a better way to call it a day than as world champion," said Karl-Heinz Rummenigge, the Bayern Munich chairman. "It's not going to be easy to replace Lahm as a player, person and captain."
DFB president Wolfgang Niersbach added: "Philipp called me this morning and informed me personally of this step. I realised very quickly that it would have been pointless trying to talk him out of his decision.
"I have thanked him for everything that he has achieved for the DFB."