Remarkably, the College hit the last four points to come from two points down at the death to triumph by two.
Both teams fought tooth and nail all through with the lead changing hands 12 times before the winning points came from Waterford’s Jamie Barron and Cork player Darragh Fitzgibbon deep in stoppage time.
UCC dominated the early exchanges racing into a 0-5 to 0-1 lead after 10 minutes, but a goal from Midleton’s Padraig O’Shea levelled the tie after the full-forward was put through by James Nagle.
Conor Lehane top-scored with eight points for Midleton and they Luke O’Farrell put them two clear late on.
In a dramatic conclusion, a Mark Coleman free and one from play from Colm Spillane tied them again, before Barron nailed the winner and Fitzgibbon got the insurance point.
UCC now take on Sarsfields in the quarter-final next Sunday.