The Serie A powerhouse have chosen ex- Italy manager the veteran manager to lead the team for the remainder of the campaign.
The experienced coach steps in for Igor Tudor, who was sacked post the Lazio setback on Sunday.
Tudor had joined the club in March filling the shoes of Thiago Motta but left after seven months following a string of eight matches without a victory.
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.
He helped them qualify for Euro 2024 exiting in the last 16 stage against Switzerland.
However, Spalletti was sacked by Italy 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 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, with one loss and two draws in their first three games.