The Old Lady have appointed former Italy boss Spalletti to take the helm for the rest of the term.
The experienced coach replaces Igor Tudor, who was dismissed after the Serie A side's defeat by Lazio on Sunday.
Tudor had joined the club in March filling the shoes of Thiago Motta but departed after seven months at the end of an eight-match winless run.
Spalletti led Napoli to the Serie A title in 2022-23 before taking charge of Italy, who had failed to qualify for the 2022 World Cup under former boss Roberto Mancini.
Under his guidance, they made it to Euro 2024 exiting in the last 16 stage against Switzerland.
Nonetheless, Italy dismissed Spalletti in June after a World Cup qualifying defeat by Norway, with the Azzurri at risk of missing out on a third consecutive World Cup.
Spalletti has also managed Inter Milan, Roma and Udinese in Serie A and lifted the Russian league trophy twice while at Zenit St Petersburg.
Massimo Brambilla took interim charge of Juventus during the 3-1 victory over Udinese on Wednesday which left them seventh in Serie A - six points behind leaders Napoli after nine games.
In the Champions League, they sit 25th in the league phase, having lost once and drawn twice in their opening three matches.