A goal by Evan Sheehan after 90 seconds settled Na Piarsaigh and they added a second courtesy of Alex Cummins in the 10th minute to lead by five points.
However, the Glen were rallied by the skillful Jamie Corkery at full-forward and with eight first-half points - six from frees - they stayed in touch.
Defensively they were ragged however and on 23 minutes, Sheehan raised a second green flag when Dessie Roche was fouled inside the square.
The Glen continued to create chances, however, and in fact outscored Roy O’Meara’s side in the first half thanks to good work by Corkery, Robert Downey and Owen O’Neill, to trail by just two at the turnaround (0-10 to 3-3).
With Hanafin coming more into the game, Na Piarsaigh went in front by five, but when Dale Tynan (44) and Corkery (45) both netted within a minute of each other, the Glen had moved into the lead.
But captain Hanafin began to lord it in midfield when it mattered most, scoring his side’s next five points as his defence finally got to grips with Corkery, who finished with 1-12.
A fourth goal by substitute Kevin Moynihan on the 54th minute sealed the deal for Na Piarsaigh.
C Hanafin 0-10 (0-4 frees; 0-1 65), E Sheehan 2-3 (1-0 pen), A Cummins 1-2, K Moynihan 1-0 and P Buckley 0-1.
J Corkery 1-12 (0-8 frees), D Tynan 1-0, R Duggan and S Busteed 0-1 each, O O’Neill 0-1 (free).
L O’Donovan; S Barrett, J Morrissey, M Walsh; S O’Meara, D Connery, C O’Flynn; C Hanafin (C), J Meaney; E Sheehan, C Allen, G Healy; C Brown, A Cummins, D Roche. Sub: K Moynihan for C Brown (36), A Higgins for S O’Meara (55) and P Buckley for D Roche (61).
R Byrne; D Morrissey, A Murphy (C), D Marshall; C Cullinane, A Cronin, C Horgan; J Higgins, O O’Neill; S Busteed, S Kennefick, R Downey; D Tynan, J Corkery, R Duggan.
D Kirwan (Éire Óg)