Cork needed to make a good start and they got it as after Aaron Gillane got the first of his five first-half points from a free.
They were one up when they found the Limerick net on 18 minutes as Shane Barrett put Hayes in on the left to bury past Nickie Quaid. Hayes thought he had another soon after but Alan Connolly had over-carried in the build-up.
At the other end, Gillane slipped when through but even though five behind, there was no panic from Limerick as they began to take over, their half-back line stepping up and epitomised by Diarmaid Byrnes, who soared to catch from defence and thumped over.
They had another goal chance when Patrick Collins made a point-blank save from Gillane, but the Shannonsiders were into a groove and held a two-point advantage at half-time.
Cork came out with renewed vigour after the break as Darragh Fitzgibbon scored early before spiritual leader Patrick Horgan got on the board as they scored nine of the 12 points in a 10-minute spell after the break.
But they would have Collins to thank again as he saved brilliantly from Gearoid Hegarty with Gillane – top-scorer on the day with 0-10 – unable to finish the rebound as play transferred and Declan Dalton hammered over to raise the roof from those in red.