Northern Ireland ace McGinn broke the deadlock a minute after the restart and put the rampant Reds further ahead in the 68th minute with a free header.
Dundee substitute Mark Stewart hit a consolation strike with eight minutes left but McGinn dashed any hopes of a comeback and completed his treble in the 88th minute.
The hosts came out all guns blazing with their first real chance falling their way inside 60 seconds. Matt Lockwood's cross wasn't properly cleared by the Dons defence and Kevin McBride latched onto the loose ball only to see his left-foot snap-shot from 12-yards just clear Jamie Langfield's far post.
Midway through the first-half Aberdeen's Joseph Shaughnessy crossed for Scott Vernon, but he fired over the bar from 10 yards.
At the other end, Dundee broke as skipper Stephen O'Donnell set up Lockwood, whose deep cross was headed over the bar by an unmarked Colin Nish at the far post.
Aberdeen got the second half off to a whirlwind start by taking the lead in the 46th minute. McGinn slid in to break the deadlock with a close-range tap-in from Cameron Smith's cross which eluded the Dundee defence.
In-form McGinn made it 2-0 after 68 minutes. Johnny Hayes caused havoc with a whipped cross for McGinn, who was all alone to nod past the helpless Rab Douglas and seal the three points.
Stewart pulled a goal back in the 82nd minute with a low drive after Nish had flicked on Gary Irvine's long throw-in.
But McGinn made the game safe when he knocked home the rebound after Douglas had parried Hayes' shot.
- Sports & Recreation
- Matt Lockwood