The Serie A powerhouse have named previous Azzurri head coach the veteran manager as their manager for the rest of the term.
The 66-year-old takes over from Igor Tudor, who was sacked post the Lazio setback on Sunday.
Tudor arrived at the club in March filling the shoes of Thiago Motta but departed after seven months after an eight-game winless streak.
Spalletti guided Napoli to the Serie A crown 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.
Yet, the Italian FA let Spalletti go in June following a loss to Norway in World Cup qualifying, putting Italy in danger of missing a third straight World Cup.
Spalletti's managerial career includes Inter Milan, Roma, and Udinese in Serie A and won the Russian Premier League twice with Zenit St Petersburg.
Juventus were temporarily led by Massimo Brambilla 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, with one loss and two draws in their first three games.