The Serie A powerhouse have chosen former Azzurri head coach Spalletti to take the helm until the end of the season.
The experienced coach takes over from Igor Tudor, who was let go post the Lazio setback on Sunday.
Tudor had joined the club in March as Thiago Motta's replacement but departed after seven months after an eight-game winless streak.
Spalletti guided Napoli to the Serie A crown in 2022-23 before taking charge of Italy, after the team's failure to reach the 2022 World Cup under former boss Roberto Mancini.
He secured their spot in Euro 2024 but were eliminated in the round of 16 by Switzerland.
Yet, the Italian FA let Spalletti go in June after a World Cup qualifying defeat by Norway, putting Italy in danger of missing a third straight World Cup.
Spalletti's managerial career includes Inter Milan, Roma, and Udinese in Serie A and lifted the Russian league trophy twice while at Zenit St Petersburg.
Massimo Brambilla served as interim manager for Juventus for their 3-1 win against Udinese on Wednesday placing them seventh in the Serie A standings - trailing leaders Napoli by six points after nine matches.
Their Champions League campaign sees them in 25th place in the group stage, with one loss and two draws in their first three games.