Derry City qualified for the Setanta Sports Cup final despite a nervy 2-0 defeat in Monday's semi-final second leg at the Brandywell.
Gary Twigg put Rovers ahead on 52 minutes and his second goal on 86 ensured a tense finish.
Twigg was denied by Gerard Doherty but both sides threatened before the break.
Daryl Kavanagh set up Twigg's opening goal and the striker's second meant Derry had to hang on for a 3-2 aggregate success.
The game saw Shamrock Rovers boss Stephen Kenny returning to the Brandywell and there was a mixed reception from the home crowd for their former hero.
Twigg was clean through in the third minute but Doherty spread himself to make a great save.
However, Derry showed enterprise themselves in the opening period with Stephen McLaughlin and Patrick McEleney both going close.
Derry's David McDaid had a penalty shout turned down after the resumption but Rovers were back in the tie on 52 minutes as Twigg bundled in Kavanagh's cross.
Ruaidhri Higgins and McDaid both went close to levelling as Derry began to dominate midway through the second half.
However, an amazing Rovers comeback in the tie looked possible on 86 minutes as Twigg hammered to the net after a goalmouth scramble.
Derry's nerves were strained further by the announcement of four minutes of injury-time but Declan Devine's side held on to set up an all-northern final meeting against Crusaders at Windsor Park on Saturday 12 May.