Napoli have had a very poor start to the season and their defeat to Roma on Sunday was the last straw.
Mazzarri has agreed a deal that will keep him with Napoli until 2011.
A club statement read: “Napoli announce they have released Roberto Donadoni from the role of head coach and appointed in his place Walter Mazzarri.
“The club want to thank Donadoni for the work done in these months and wish him the best of luck for the future.”