Afghanistan were put in to bat by the hosts in Belfast and Shahzad made them pay with his 87-ball century.
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 not out from 33 balls as Afghanistan amassed 305-7 in their 50 overs, 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 one-day 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 complete their pre-World Cup schedule with another warm-up against England at The Oval on May 27.
They get their World Cup campaign underway against Australia in Bristol on June 1.