Torino shocked nine-man Inter with a 2-1 Serie A victory at San Siro, the slim hopes of Champions League qualification for Roberto Mancini's men severely damaged as a result.
The visitors had to come from behind as Inter captain Mauro Icardi gave his side an early lead, converting a penalty harshly awarded for handball against Torino defender Emiliano Moretti.
Torino levelled shortly after the interval when Cristian Molinaro finished with aplomb after an excellent team move and Inter's task then got harder when Miranda was sent off, receiving his second yellow card for a late tackle on Andrea Belotti.
Yuto Nagatomo was dismissed for bringing down Belotti in the box - Inter's 10th red card of the league season - and Belotti himself converted the penalty, sending Samir Handanovic the wrong way, leaving the Champions League dreams of Inter in tatters and easing the pressure on Torino coach Giampiero Ventura.
Ventura's side are now eight points above the relegation zone following a second win in 12, while Inter stay fifth and are eight points behind Roma in the battle for third place.
Before the match there was a minute's applause for AC Milan legend Cesare Maldini, who ended his playing career at Torino, after the former Italy coach passed away at the age of 84 on Sunday.
The hosts took the lead in the 17th minute when a sliding Moretti inadvertently blocked a shot by Marcelo Brozovic with his arm, the referee awarding a penalty after consulting with the official behind the goal.
Daniele Padelli dived to his left and chose correctly, but Icardi's penalty was struck too well, the Argentina international netting his 13th Serie A goal of the season.
Miranda almost bundled in a second after 32 minutes but saw his effort blocked, before Icardi turned an effort wide of the post.
Belotti raced through on goal from Cesare Bovo's defence-splitting pass after 52 minutes, but Handanovic did brilliantly to deny him with a block.
Handanovic could do nothing about Torino's equalising goal three minutes later, however.
Bovo won the ball with a well-timed tackle and a terrific team move led to Maxi Lopez holding the ball up for Molinaro to slam in an unstoppable finish.
Inter's horrible start to the second half then got worse when Miranda was dismissed for a late foul on Belotti, earning a second yellow card.
After 67 minutes Padelli made a magnificent save to deny Icardi's downward header before Handanovic claimed a Lopez flick after a rapid Torino break as the game grew more open.
Inter were soon down to nine men when Belotti went down under Nagatomo's tackle in the box, the striker stepping up to slot in his eighth Serie A goal in 2016.
Substitute Daniele Baselli almost added a third for Torino deep in injury time but his superb strike came back off the post with Handanovic beaten as the visitors triumphed at Inter for the second season in succession.