Hosts Dublin turned in their best performance of the Mattie Kenny era, holding firm late on at Parnell Park to secure a thrilling two-point Allianz Hurling League Division 1B win.
Oisin O'Rorke's 0-11 haul was crucial though former All-Star Danny Sutcliffe was superb, picking off four points and dropping deep in the second-half to shore up the defence.
Dublin led by five points with 25 minutes to go but were pegged back to level terms on four occasions in the final quarter as Waterford threw everything at them.
The 2017 All-Ireland finalists even moved ahead on a couple of occasions but were crucially outscored by 0-4 to 0-1 in the closing minutes with O'Rorke hitting all four of those Dublin scores.
There was more drama at the death as Waterford were awarded a penalty deep into injury-time after Darragh O'Connell's foul on Thomas Ryan but Stephen Bennett, after hitting 2-7, failed to convert.
O'Connell was sent off for the indiscretion though Dublin held on and will be confident of beating Laois next weekend in their final group game.
As for Waterford, they play Galway in another huge encounter for Pauric Fanning's side.
Waterford came into the contest with 9-65 in their credit column after easily dismissing Offaly, Laois and Carlow though sensed this would be a significant step up.
Dublin, beaten by six points in Galway in Round 3 following wins over Carlow and Offaly, took the game to Waterford from the off and registered a healthy 0-14 in the first-half.
John Hetherton gave Dublin an aerial presence in attack and scored one terrific point after plucking a ball out of the sky.
Sutcliffe was excellent too and scored three first-half points while he also laid one on for Chris Crummey and got through a tonne of good work.
Caolan Conway was the only Dublin forward that didn't get on the scoresheet in the opening 35 minutes as seven different players in total split the posts.
Waterford only scored six times in the half but three of those were goals which kept them in the contest.
Stephen Bennett couldn't believe his luck for the first when his miscued long free in somehow evaded goalkeeper Alan Nolan and dropped in.
Thomas Ryan got the second after sneaking through the centre of the Dublin defence after a long ball in and bundling the ball by Nolan.
Shane Bennett, Waterford's liveliest forward, scored their third in the 26th minute when picked out close to goal with a clever one-handed stick pass by Stephen Bennett.
That goal put Waterford 3-1 to 0-7 ahead but Dublin responded impressively, reeling off four stunning points from Crummey, Sutcliffe, Hetherton and Eamonn Dillon.
The 2011 league champions kept the intensity up until the break with further points from Sutcliffe, Oisin O'Rorke and Crummey.
The second-half was even more entertaining with Dublin initially stretching their lead thanks to scores from O'Rorke and Hetherton before Waterford rallied.
They Deise got it back to level terms in the 52nd minute with a series of points as they finally found their groove.
Jack Prendergast, Ryan, Kevin Moran and Jamie Barron all pointed as the Deise wiped out what was at one stage a five-point Dublin lead.
They were level three more times as the lead swapped back and forth in what turned into a gripping contest.
Waterford thought they might just hold on but free-taker O'Rorke ultimately punished their foul play with a series of points that won it for Dublin.
Dublin: Alan Nolan; Darragh O'Connell, Eoghan O'Donnell, Paddy Smyth; Chris Crummey (0-02), Sean Moran, Shane Barrett (0-01); Daire Gray, Riain McBride; Caolan Conway, Danny Sutcliffe (0-04), Eamonn Dillon (0-04); John Hetherton (0-02), Liam Rushe (1-01), Oisin O'Rorke (0-11, 0-7f, 0-01 65).
Subs: Tomas Connolly for Barrett 49, Sean Treacy for Gray 49, Jake Malone for McBride 53, Fergal Whitely (0-01) for Treacy 56, Donal Burke for Conway 64.
Waterford: Billy Nolan; Shane McNulty, Conor Prunty, Noel Connors; Callum Lyons, Austin Gleeson, Kevin Moran (0-02); Jamie Barron (0-02), Mark O'Brien; Jack Prendergast (0-01), Stephen Roche, DJ Foran; Shane Bennett (1-02), Stephen Bennett (2-07, 1-07f), Thomas Ryan (1-01).
Subs: Michael Walsh for Foran h/t, Mikey Kearney for O'Brien h/t, Philip Mahony for Lyons 53, Jordan Henley for Prunty 58, Pauric Mahony for Prendergast 61.
Referee: Fergal Horgan (Tipperary).