The Old Lady have chosen previous Italian national team boss the veteran manager as their manager for the rest of the term.
The experienced coach steps in for Igor Tudor, who was dismissed post the Lazio setback last weekend.
Tudor had joined the club in March as Thiago Motta's replacement but departed after seven months following a string of eight matches without a victory.
Under Spalletti, Napoli clinched the Serie A championship in 2022-23 then moving on to lead the Italian national team, who had failed to qualify for the 2022 World Cup during Roberto Mancini's tenure.
He helped them qualify for Euro 2024 but were eliminated in the round of 16 by Switzerland.
However, Spalletti was sacked by Italy in June after a World Cup qualifying defeat by Norway, as Italy faced the possibility of not making a third World Cup in a row.
Spalletti has also managed Inter Milan, Roma and Udinese in Serie A and won the Russian Premier League twice with Zenit St Petersburg.
Massimo Brambilla took interim charge of Juventus during the 3-1 victory over Udinese on Wednesday moving them to seventh position in the league - trailing leaders Napoli by six points after nine matches.
Their Champions League campaign sees them in 25th place in the group stage, having lost once and drawn twice in their opening three matches.