The 2010 Champions League winners have suffered a series of blows and gone through five coaches since their unprecedented treble under Jose Mourinho.
"FC Internazionale would like to thank Andrea Stramaccioni for the great commitment and professionalism he showed in a particularly difficult year. Walter Mazzarri has signed a two-year deal, " the club said on their website.
The usually fast-paced Italian managerial merry-go-round has gone into overdrive since the end of the season.
Media reports say Chelsea interim manager Rafael Benitez is poised to join Napoli while AC Milan boss Massimiliano Allegri is clinging to his job and AS Roma are without a permanent coach.
The Gazzetta dello Sport website said Mazzarri, who announced his departure from Napoli after their 2-1 loss at Roma in their last game of the season on Sunday, has signed a deal worth 3.5 million euros a year.
The 51-year-old took Napoli to second place in Serie A this season and re-established them as a force in Italian football over his four-year spell in charge. They also won the Italian Cup last year.
"We needed to make this change because this year will be difficult and I thought that there was a need for a manager with the experience of Mazzarri," Inter president Massimo Moratti told reporters on Friday.
"That doesn't change the fact that I have a high regard for the talent and potential of Stramaccioni and I'm convinced he will become one of the best Italian managers.
"He's been very unlucky recently and maybe right now he needs to go somewhere easier than Inter, and with the year he's had he will find somewhere."
Reports of Mazzarri replacing Stramaccioni have been in Italian media for days.
The 37-year-old Stramaccioni surprisingly stepped up from managing Inter's youth setup to take charge of the first team last March following the sacking of Claudio Ranieri.
He did a good enough job in the final stages of that season to earn himself a three-year contract.
Early this season Inter looked to be title challengers and a run of seven straight wins finished with them ending Juventus' 49-match unbeaten streak and moving a point behind the league leaders.
However, their form dropped off straight afterwards and their season was soon engulfed by a series of bad injuries to top names including Diego Milito, Dejan Stankovic, Rodrigo Palacio, Antonio Cassano and Javier Zanetti.
They finished in ninth place on 54 points after winning only five games after the mid-season break and ended the campaign with 16 defeats.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.