The Serie A powerhouse have appointed previous Italy head coach Spalletti to take the helm for the rest of the term.
The 66-year-old steps in for his predecessor, who was dismissed following the loss to Lazio last weekend.
The former boss came on board in March to replace Thiago Motta but departed after seven months after an eight-game winless streak.
Spalletti guided Napoli to the Serie A crown in 2022-23 then moving on to lead the Italian national team, who had failed to qualify for the 2022 World Cup during Roberto Mancini's tenure.
He secured their spot in Euro 2024 where they were knocked out in the last 16 by Switzerland.
Yet, the Italian FA let Spalletti go in June following a loss to Norway in World Cup qualifying, 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 won the Russian Premier League twice with Zenit St Petersburg.
Massimo Brambilla took interim charge of Juventus for their 3-1 win against Udinese on Wednesday moving them to seventh position in the league - six points adrift of Napoli at the top after nine rounds.
They are 25th in the league phase of the Champions League, having lost once and drawn twice in their opening three matches.