Michael Collins executed the winning penalty as Newbridge College ambushed St Michael's at Energia Park.
With the Kildare school's goal-kicker Andrew Carroll having been replaced, Collins held his nerve to dump out the Junior Cup holders.
St Michael's started promisingly and were 8-5 up after 18 minutes with Andrew Cosgrave touching down after Jules Fenelon had opened the scoring from a penalty.
Andrew Carroll had kicked Newbridge's opening penalty and then put his side 12-8 up on 50 minutes after converting Harry Farrell's try.
It swung back to St Michael's with hooker Matthew Furlong getting over the line and Fenelon adding the extras on 53 minutes.
It was game on again and Newbridge flanker Ronan McGroary steamed over in the corner.
Fenelon responded from a penalty, superbly finding his range from 35 metres and at an awkward angle.
That looked to be it, or so it seemed. There was still one last kick left in Newbridge and it was Collins who fired the decisive shot.
St Michael's - M Green-Delany; D Ryan, J Fenelon, A Cosgrave, P Wood; M Canniffe (L Kirkham 34), J Sherwin; T Stewart (capt), M Furlong, R Coogan; D Lydon, M O'Reilly; J White, R Brown, B O'Donohue.
Newbridge - T Brophy; A Larkin-Smithers, H Farrell, J Collins, A Carroll (M Masterson 50); P Taylor, C Mangan (M Collins 54); S Davitt, J Sheedy, D Walsh; R Munnelly (S Watson 44), S Treacy (P Forde 54); S Menton, R McGroary, R Byrne (capt).
Ref - T Colton.