Shahzad made Ireland pay with his 87-ball century after the hosts put Afghanistan to bat first.
Together with Rahmat Shah, Shahzad put on 150 for the second wicket to help the visitors take control.
Najibullah Zadran added a rapid-fire 60* off 32 balls as Afghanistan amassed 305-7 in their innings, a total that set a record for internationals at Stormont's Civil Service Cricket Club.
Ireland never looked likely to threaten Afghanistan's total despite Paul Stirling's 56-ball half century -- his fourth successive score of 50 or more.
Gulbadin Naib, who was named Afghanistan's ODI captain last month, was Ireland's chief tormentor.
Naib took 6-43 to record the third-best figures by an Afghanistan bowler in ODI cricket, including the key wickets of Stirling and Gary Wilson, who was Ireland's second highest scorer with 34.
Ireland eventually crumbled to 179 all out as Afghanistan avenged their 72-run defeat in the first game of the two-match series on Sunday.
Afghanistan get their World Cup campaign underway against Australia in Bristol on June 1.