Spalletti was expected to take a year-long sabbatical from football after guiding Napoli to their first Serie A title in 33 years at the end of last season.
But after Roberto Mancini unceremoniously quit his role as Italy manager earlier this month, Spalletti has accepted a call from the Italian Football Federation to replace him.
Mancini was in charge of the Azzurris for five years and led them to glory at EURO 2020, beating England in the final.
The former Manchester City boss presided over a record 37-match unbeaten run between October 2018 and October 2021.
However under the 58-year-old's tenure, Italy failed to qualify for the 2022 FIFA World Cup in Qatar.
In all, Mancini was in charge for 39 wins, 13 draws and nine defeats with Italy.
"The national team needed a great coach and I'm very happy that he accepted," federation president Gabriele Gravina said.
"His enthusiasm and his expertise will be fundamental for the challenges that await Italy in the coming months."
Spalletti's first matches in charge of Italy will come against North Marcedonia and Ukraine in the EURO 2024 qualifiers next month.