Juventus have chosen former Italy head coach the veteran manager to take the helm for the rest of the term.
The 66-year-old replaces Igor Tudor, who was dismissed following the loss to Lazio on Sunday.
Tudor arrived at the club in March as Thiago Motta's replacement but departed after seven months at the end of an eight-match winless run.
Under Spalletti, Napoli clinched the Serie A championship in 2022-23 then moving on to lead the Italian national team, which missed out on the 2022 World Cup during Roberto Mancini's tenure.
Under his guidance, they made it to Euro 2024 exiting in the last 16 stage against Switzerland.
Yet, the Italian FA let Spalletti go 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 secured two Russian Premier League titles with Zenit St Petersburg.
Massimo Brambilla served as interim manager for Juventus for their 3-1 win against Udinese on Wednesday which left them seventh in Serie A - trailing leaders Napoli by six points after nine matches.
In the Champions League, they sit 25th in the league phase, with one loss and two draws in their first three games.