Roma midfielder Radja Nainggolan continued his fine form this season with two goals as the Lupi left Inter three points better off.
Mauro Icardi got Inter's only goal, though Diego Perotti scored from the penalty spot to wrap up three points and the win.
Juventus remain seven points clear at the top of Serie A, though Roma have moved five clear of Napoli in third place. Meanwhile, Inter's hopes for potential Champions League football next season took a dent as they lie six points behind the Partenopei.
Having bagged three in his last five matches, Nainggolan drove Roma forward at the Stadio Meazza, first hitting a spectacular shot 12 minutes in, then adding to his tally just before the hour with a surging run from the halfway line, then a thunderous strike into the top corner.
As the game wore on the hosts laid siege to the Giallorossi goal but were unable to find a way past Wojciech Szczesny until Icardi tapped home from close range with 10 minutes left.
However, Roma closed out the game as Gary Medel tripped Edin Dzeko in the penalty area and Perotti cooly side-footed the ball past Samir Handanovic.