The Serie A powerhouse have chosen previous Italy manager the veteran manager to take the helm for the rest of the term.
Spalletti takes over from Igor Tudor, who was dismissed following the loss to Lazio recently.
The former boss came on board in March as Thiago Motta's replacement but exited following a seven-month stint 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, after the team's failure to reach the 2022 World Cup under former boss Roberto Mancini.
Under his guidance, they made it to Euro 2024 but were eliminated in the round of 16 by Switzerland.
However, Spalletti was sacked by Italy in June post a qualifying defeat against 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 secured two Russian Premier League titles with 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 adrift of Napoli at the top after nine rounds.
They are 25th in the league phase of the Champions League, after recording one defeat and two ties in the initial three fixtures.