The Giallorossi stormed into a two-goal lead in the first half but a Rodrigo Palacio strike ensured that the Milan outfit still have every chance of reaching the finalRoma hold a slight advantage in their Coppa Italia semi-final with Inter as they emerged 2-1 winners in the first leg at Stadio Olimpico.
The Giallorossi exploited glaring holes in the visitors' three-man defence to race into a two-goal lead with a pair of headers from Alessandro Florenzi and Mattia Destro, respectively. The Nerazzurri pulled one back through Rodrigo Palacio at the close of the first half and despite an improved display after the break they were unable to find another.
Roma looked keen to make the most of their home advantage as they attacked eagerly during the early exchanges. Destro saw the first effort of the game saved comfortably, but in the 13th minute, Zdenek Zeman's side took the lead.
The adventurous Ivan Piris flighted in a pinpoint delivery from the right and Florenzi made the most of some slack marking to nod the ball past Samir Handanovic and into the top corner.
The Nerazzurri responded well and caught Roma off guard with a counter-attack moments later, but Fredy Guarin's shot crashed off the outside of the post.
Almost instantly the hosts were down the other end and should well have doubled their advantage. After a brilliant dummy from Destro, Totti failed to take the ball round Handanovic and Erik Lamela's follow up was cleared off the line by Andrea Ranocchia.
But the centre-back's heroics were soon forgotten as he was largely culpable for Roma's second goal. Ranocchia did not get tight enough to Destro and the striker capitalised, heading in from Piris' cross at the near post after 33 minutes.
Inter were continually being exposed down their left and it nearly proved the source of yet another goal as Handanovic parried a cross onto his own post before Guarin cleared away.
To their credit Andrea Stramaccioni's men kept their heads up and after Guarin had been denied by a brilliant Maarten Stekelenburg save, Palacio poked home following a quality delivery from Esteban Cambiasso to halve the deficit in the 44th minute.
Stramaccioni replaced Joel Obi with Yuta Nagatomo for the second half, switching to a four-man defence, and it gave his team a more solid base from which to attack.
Guarin was still the spearhead of everything positive the visitors created as he supplied numerous piercing passes as well as pulverising, albeit off-target, shots at goal.
Roma were far from the attacking force that they had been in the first half and they nearly gifted Inter an equaliser in the 68th minute. Piris failed to deal with a cross into the area and after seeing his initial effort blocked by Leandro Castan, Palacio's second effort was held by Stekelenburg.
Ricardo Alvarez was introduced 15 minutes from time and he nearly had the perfect impact as he seized upon some poor control by Federico Balzaretti, but his curled effort flew agonisingly wide of the goal.
But the Giallorossi managed to hold on until the final whistle, though an away goal for the Milan side means the tie will still be very much in the balance when the pair meet at San Siro for the second leg.