A costly eight second-half wides cost the Dubs dearly when they suffered their first defeat in Fortress Croker since losing to Tyrone there in last year's league.
Dublin raced into an early four point lead in a free-scoring first-half but Daniel Goulding's impeccable freetaking got the Rebels back into it and they led by two points at half-time (1-11 to 0-12) thanks to a John Hayes goal.
Dublin nearly got in for a green flag immediately afterwards but Ken O'Halloran got up to stop Bryan Cullen's punched effort but they had the consolation that 10 of their first-half points came from play and they looked very slick at times.
Some astute switches and substitutions saw them battle back and it was level on the hour with Dublin totally dominating midfield for the last quarter.
But their shooting boots deserted them while Cork substitutes Colm O'Neill and Donal Hodnett got off two brilliant long-range shots in the last four minutes to cause a shock and keep the Rebels' unbeaten record intact.
Scorers - Cork - D Goulding 0-7 (7f), J Hayes 1-3, D Hodnett and C O'Neill 0-2 each, F Goold, P Kerrigan and B Hurley 0-1 each. Dublin: C Costello 0-4 (1f), K McManamon 0-3, C Kilkenny 0-3 (1f), S Cluxton 0-3 (2f, 1'45), C Reddin 0-2, J McCarthy, S Carthy and P Hudson 0-1 each.
Dublin - S Cluxton; P McMahon, S George, M Fitzsimons; E Lowndes, J McCarthy, J Cooper; C O'Sullivan, MD Macauley; P Flynn, C Kilkenny, B Cullen; K McManamon, C Reddin, C Costello.
Subs - J McCaffrey for George (25), D Nelson for Lowdnes (half-time) E O'Gara for Byrne (46), P Hudson for Costello (52), S Carthy for Reddin (63).
Cork - K O'Halloran; A Cronin, E Cadogan, N Galvin; K Loughrey, C Dorman, T Clancy; A Walsh, F Goold; J O'Rourke, P Kerrigan, M Collins; D Goulding, B Hurley, J Hayes. Subs - K Crowley for Dorman (26), D Hodnett for Galvin (half-time), C O'Neill for Goulding (51), R Deane for Walsh (54), A O'Sullivan for Goold (58), K O'Driscoll for Loughrey (71).