Alan McNally and Gavin Brennan saw red as Robbie Horgan's men suffered a narrow home defeat against the EA Sports Cup champions
Robbie Horgan's side had a man sent off in each half, but fought valiantly despite going behind after just three minutes. Ciaran Kilduff gave the Hoops the lead with the first chance of the game as Karl Sheppard found the striker in the area.
Two yellow cards in the space of seven minutes saw Drogheda reduced to 10 men just before half time, as Alan McNally received his marching orders for two bookable offences.
Drogs' hopes of progressing to the last eight looked to be over when Gavin Brennan was sent off after taking down Sean O'Connor in the area. The midfielder receieved a booking for the foul, but was sent to the stands for his reaction after the incident.
Dean Kelly stepped up to score the penalty, putting it beyond goalkeeper Dylan Connolly. Despite having two men sent off, Drogheda battled to stay in the game, and reduced the deficit when Eric Foley scored from the spot after a foul by teenage defender Evan Osam.
Shamrock Rovers held on for the victory to advance to the quarter-final and give themselves a chance of retaining the League of Ireland Cup trophy.