The Old Lady have chosen previous Italian national team boss the veteran manager to lead the team until the end of the season.
The 66-year-old replaces Igor Tudor, who was dismissed post the Lazio setback last weekend.
Tudor had joined the club in March as Thiago Motta's replacement but left after seven months after an eight-game winless streak.
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 under former boss Roberto Mancini.
He helped them qualify for 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, 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 lifted the Russian league trophy twice while at Zenit St Petersburg.
Massimo Brambilla served as interim manager for 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.
They are 25th in the league phase of the Champions League, with one loss and two draws in their first three games.