Die Mannschaft - as Germany's team is nicknamed - lost to Paraguay in a penalty shootout in the last 32 at the Boston Stadium on 29 June.
Nagelsmann said after the loss that he was willing to stay on and fulfil a contract running until 2028 with the German football federation (DFB).
But the 38-year-old stepped down on Friday following a three-hour meeting with DFB executives on Thursday.
"Regarding the appointment of a new head coach, the DFB leadership will now seek talks with Jürgen Klopp," said a DFB statement. "He has already signalled his general willingness to take on the role."
Klopp, 59, was appointed chief of Red Bull's international network of clubs in October 2024. He has been working as a pundit for a German TV station at the World Cup in the United States, Mexico and Canada.
During the tournament, he had to apologise for hinting that Nagelsmann's three-year tenure could be coming to an end.
"My top priority has always been the team's success," Nagelsmann said in a statement released by the DFB. Julian Nagelsmann took over as Germany head coach in September 2023.
"After such a bitter disappointment, the team deserves the chance for a fresh start.
Liverpool's Klopp hits out at Club World Cup timing
"A special thank you also goes to the fans. You carried us, you trusted us, you gave us energy, even during difficult times."
The former Bayern Munich boss added: "It truly pains me that we disappointed you and couldn't give you any more memorable nights of football at this World Cup."
Under Nagelsmann, Germany reached the quarter-finals at the 2024 European championships.
Success at 2026 World Cup
Unlike Germany sides at the 2018 and 2022 World Cups, his squad came through the group stages to reach the knockout rounds.
Boasting players turning out for top European teams such as Bayern Munich, Liverpool and Arsenal, there was an expectation Germany would reach the latter stages of the 2026 tournament.y
But Paraguay upset that dream with a doughty defensive display in the 1-1 draw and better technique in the penalty shootout.
"The DFB expressly thanks Julian Nagelsmann for his work since September 2023," said DFB supremo Bernd Neuendorf.
"He is characterised by a high level of commitment and extraordinary ambition. Julian Nagelsmann is also an extremely responsible and sincere person whom we all value."
Liverpool boss Klopp urges players to respect Villareal in Champions League semi
Klopp boasts one of the best coaching resumés in world football.
While at Borussia Dortmund, he led them to back-to-back Bundesliga crowns in 2011 and 2012. They were runners-up in the following two years. They also won the German Super Cup twice and the German Cup.
After moving to Liverpool n 2015, he steered the side to eight trophies including the English Premier League and Champions League.


Transport Ministry defends purchase of diesel locomotives, rejects NPP criticism
Outdoor air pollution costs Ghana more than GH¢28 billion - UNDP
Yagbonwura joins Asantehene for fifth Awukudae celebration
How US lawmaker Carol Ammons traces ancestry to Paga, enskinned as Queen Mother
NDC signs cooperation agreement with Russia's United Russia Party
Canada-Ghana trade rises 56% to US$752 Million
Foreign Affairs Ministry to replace passports lost, damaged in floods
Two bodies retrieved after flooding at Adakope near Weija
Heartbreaking moment as Senegalese fan reportedly passes out after Belgium's dra...
Elderly man allegedly throws stone at resident after being caught dumping refuse...