The Frenchman's contract length has not been specified.
Napoli turned to Garcia after Spalletti decided to take a year-long sabbatical after leading them to their first Serie A title in 33 years.
Spalletti still had a year left on his contract but Napoli owner Aurelio De Laurentiis granted him his wish anyway.
Garcia was sacked in his previous role as manager of Saudi Arabia side Al-Nassr back in April and returns to Italy for the first time since 2016 when he was in charge of AS Roma for three years.
Garcia has also managed French sides Olympique Lyon and Olympique Marseille in the past and led Lille to the Ligue 1 title in the 2010/2011 season.
"I have the pleasure of announcing that, after having met and attended him during the last 10 days, Mr Rudi Garcia will be the new coach of Napoli," said owner De Laurentiis.
"A sincere welcome to him and a big good luck!"