Ranieri left after a weekend defeat by old rivals Juventus, their sixth loss in 10 games in all competitions, left them struggling to qualify for next season's Champions League.
The Serie A club said on their website that Ranieri had left his post and Andrea Stramaccioni, who was on the coaching staff, would take temporary charge of the team, becoming Inter's third coach of the season.
"The President Massimo Moratti and all FC International would like to thank Claudio Ranieri and his staff for their professionalism and dedication and sincerity in recent months at the helm of the team," a club statement said.
Ranieri, the former Chelsea, Valencia, Juventus and AS Roma manager, took over at Inter last September but the side have struggled and are eighth in Serie A, 10 points behind third-placed Lazio who are in the final Champions League spot.
Inter Milan won the Champions League, Serie A and Italian Cup treble in 2010 under coach Jose Mourinho, who left immediately afterwards, and claimed the Serie A title five seasons in a row from 2006.
However, they have struggled since with an ageing team and twice this season broke the record for fielding the oldest side in the Champions League. Their team in the first game of the last tie against Olympique Marseille had an average age of 31 years and 331 days.
Ranieri replaced Gian Piero Gasperini who was in charge for only five competitive matches, and was their fourth coach since Mourinho's departure, the club having parted company with Rafael Benitez and Leonardo last season
Moratti had suggested earlier on Monday that Ranieri would see out the season.
"I think so," Moratti told reporters when asked if Ranieri would stay in charge for the rest of the campaign.
"Of course [the Juventus defeat] is a blow, it's also a rather undeserved defeat given the way we played in the first half, but seeing as we didn't score a goal, then obviously you can also concede."
Inter's only glimmer of hope this term has been the youth team winning a competition in London at the weekend and Moratti suggested it was time to give some of them a chance at senior level.
"I'm not the coach but I think there are already three or four who could feature for a few minutes, perhaps even more," he said.
Ranieri had previously defended his decision to bank on experience, saying young players could buckle easily under the pressure at the San Siro.
Ranieri made a slow start but a run of seven consecutive Serie A wins in December and January, including a 1-0 victory over neighbours AC Milan, suddenly had them talking of challenging for the title.
Instead, Inter suffered a dramatic loss of form which also included Champions League elimination at the hands of Olympique Marseille.
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.