The Old Lady have chosen previous Azzurri boss the veteran manager to lead the team for the rest of the term.
Spalletti replaces Igor Tudor, who was let go 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 following a string of eight matches without a victory.
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 during Roberto Mancini's tenure.
Under his guidance, they made it to Euro 2024 but were eliminated in the round of 16 by Switzerland.
Nonetheless, Italy dismissed Spalletti 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's managerial career includes 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 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, with one loss and two draws in their first three games.