The Old Lady have appointed ex- Azzurri manager Spalletti to lead the team for the rest of the term.
The 66-year-old 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 exited following a seven-month stint at the end of an eight-match winless run.
Under Spalletti, Napoli clinched the Serie A championship in 2022-23 before taking charge of Italy, which missed out on the 2022 World Cup under former boss Roberto Mancini.
He helped them qualify for Euro 2024 where they were knocked out in the last 16 by Switzerland.
Nonetheless, Italy dismissed Spalletti in June post a qualifying defeat against Norway, as Italy faced the possibility of not making a third World Cup in a row.
He has previously coached Inter Milan, Roma, and Udinese in Italy's top flight and won the Russian Premier League twice with Zenit St Petersburg.
Massimo Brambilla took interim charge of Juventus in the midweek 3-1 triumph over Udinese placing them seventh in the Serie A standings - trailing leaders Napoli by six points after nine matches.
In the Champions League, they sit 25th in the league phase, with one loss and two draws in their first three games.