Garcia took charge of 16 games after replacing Scudetto-winning boss Luciano Spalletti this summer and departs with a record of eight wins, four defeats and four draws.
A 1-0 home defeat to lowly Empoli on Sunday has left Napoli fourth on the Serie A table and ten points behind leaders Inter Milan.
Mazzarri is returning to the Diego Armando Maradona stadium for a second spell, having taken charge of Napoli from 2009 to 2013.
He won one Coppa Italia trophy during his first stint at the club.
“Societá Sportiva Calcio Napoli have decided to remove Mr Rudi Garcia from the role of head coach. We thank him and his staff for the collaboration shown until now,” read a club statement.
President Aurelio De Laurentiis announced the new coach before the official club account, with a simple message: ‘Welcome back Walter!’
Mazzarri's first game back will come against Atalanta after the November international break.