The visitors achieved a hard-fought win over Pierpaolo Bisoli's men, who proved to be a very tough nut to crack in an end-to-end clash
Giampaolo Pazzini was on target for the visitors in the first half, but his goal was cancelled out from the spot by Gaston Ramirez after the break.
Diego Milito and Lucio then tipped the scale in Inter's favour with strikes in the final 10 minutes of the game to secure the three points.
Inter got off to a positive start to the match and as early as the eighth minute Walter Samuel was presented with a clear-cut chance to open the scoring, but failed to overcome Jean-Francois Gillet from close range, sending his shot straight at the goalkeeper from seven yards out.
Moments later, Marco Di Vaio almost punished a lapse in concentration by Yuto Nagatomo as he cut in the box from the left, but blasted his finish narrowly over the bar. Near the 20-minute mark Inter were presented with another chance, but Coutinho could only fire wide from outside the box.
Inter were beginning to tighten their grip and were soon rewarded for their efforts when five minutes from the half-time whistle Pazzini opened the scoring. Diego Forlan found Esteban Cambiasso into space, and in turn the Argentinian released the ex-Sampdoria man, who slotted into the right corner.
The second half saw Bologna pick up their game in search of an equaliser. Di Vaio forced Julio Cesar into a good save with a header in the 53rd minute, before Gaston Ramirez nearly scored a wonder-goal with a superbly taken free-kick just after the hour mark.
Moments after that attempt, Pierpaolo Bisoli's men finally got their equaliser through Diamanti, who converted a penalty conceded by Samuel for a foul on Daniele Portanova.
Bologna's celebration did not last long, however, as in the 70th minute goalkeeper Gillet was forced to leave the pitch, and was substituted by Federico Agliardi.
Nevertheless the hosts continued to press, but just as it looked like they were going to score a decisive second, they were made to pay for their excessively aggressive approach as a swift attack saw substitute Milito break free in the penalty box. That forced Archimede Morleo to pull him down and the Argentinian easily converted the resulting penalty to restore Inter's lead, while the defender was sent off.
Defender Lucio put the cherry on the with a fine header in the 88th minute to seal the three points for Ranieri's men.
Following tonight's result, Inter are 11th in the standings, while Bologna are 19th with just a single point. Ranieri's next Serie A game is at home against Napoli in a week, while Bisoli's men face a tough trip Udinese.