The Serie A powerhouse have named ex- Italy manager the veteran manager to lead the team until the end of the season.
Spalletti takes over from his predecessor, who was dismissed after the Serie A side's defeat by Lazio on Sunday.
The former boss came on board in March as Thiago Motta's replacement but departed 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, who had failed to qualify for the 2022 World Cup under former boss Roberto Mancini.
He helped them qualify for Euro 2024 exiting in the last 16 stage against Switzerland.
However, Spalletti was sacked by Italy 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 for their 3-1 win against Udinese on Wednesday which left them seventh in Serie A - six points behind leaders Napoli after nine games.
In the Champions League, they sit 25th in the league phase, after recording one defeat and two ties in the initial three fixtures.