Schweinsteiger became a symbol of Germany's charge to a fourth trophy, battling on through the final victory over Argentina despite taking an elbow in the face that left blood pouring from a cut.
"Will miss you on the team, my friend! Had a great time! Thank you Philipp," said a Twitter tribute from Schweinsteiger to his Bayern Munich team-mate after Lahm's announcement.
Lahm is quitting international football at the age of 30 having played 113 times for his country.
Age is not on Schweinsteiger's side. He will be 30 on August 1, has played 108 matches and has struggled with injuries over the past two years.
But he was already officially Lahm's deputy and his leadership qualities have been widely praised.
"You don't need to think for very long," said Lothar Matthaus, Germany's captain when they won the 1990 World Cup, who appeared a record 150 times for his country.
"I am going on the principle that Bastian Schweinsteiger will take over the captain's arm band. He is already vice-captain," Matthaus told Sky Sport television.
German coach Joachim Loew has not said when he will name a new captain and is under no pressure as European Championship qualifying does not start until September.
"It will not be easy to replace Philipp Lahm as a player, as a person and as captain," said another German legend, Karl-Heinz Rummenigge, current chief executive at Bayern.
Rudi Voller, Germany's coach when Lahm made his international debut in 2004, said the Bayern defender could have kept going until the next World Cup in Russia in 2018.
Loew has concentrated on joining tributes to Lahm, who only told him of his decision at breakfast on the day after Sunday's World Cup final.
"He is a world class player. He proved it again in recent weeks in Brazil," said Loew in a statement released by the German Football Federation (DFB).
"Philipp is a model professional who sacrifices everything for (team) success," added Loew, who made Lahm his skipper just before the 2010 World Cup finals.
"He was always a central and very important figure to talk to, with whom we were able to discuss our ideas.
"He can be proud of his career. He is a fantastic player with a big heart, lots of passion and character," Loew said.
Lahm said he had been thinking all season about retiring from the German team.
Without giving anything away about his bombshell announcement, Lahm said at the World Cup he realised it would probably be his last and vowed "so I'm going to throw all my energy into the battle."
Lahm, one of the best defenders of his generation, said through his agent that having won the World Cup, "it's the right time for me" to leave.
He remains under contract with Bayern, his lifelong club -- apart from two seasons on loan with VfB Stuttgart -- until 2018.
On top of the World Cup, with Bayern Lahm has won five Bundesliga titles, five German Cups, the German Super Cup twice and the Champions League, European Super Cup and the Club World Cup.
DFB president Wolfgang Niersbach praised Lahm as "not only an extraordinary player but also an absolute role model."
Germany's Chancellor Angela Merkel expressed her "greatest respect" for Lahm's achievements.