The Old Lady have chosen former Italy manager the veteran manager to take the helm for the rest of the term.
Spalletti steps in for Igor Tudor, who was let go post the Lazio setback on Sunday.
Tudor had joined the club in March to replace Thiago Motta but departed after seven months at the end of an eight-match winless run.
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 during Roberto Mancini's tenure.
He secured their spot in Euro 2024 where they were knocked out in the last 16 by Switzerland.
Nonetheless, Italy dismissed Spalletti in June post a qualifying defeat against Norway, putting Italy in danger of missing a third straight World Cup.
He has previously coached Inter Milan, Roma, and Udinese in Italy's top flight and lifted the Russian league trophy twice while at 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 - six points adrift of Napoli at the top after nine rounds.
Their Champions League campaign sees them in 25th place in the group stage, having lost once and drawn twice in their opening three matches.