Ireland registered their first-ever ODI win over South Africa.
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.
Rashid, who made 52 while batting, and fellow spinner Mujeeb Ur Rahman claimed two wickets each to flatten Ireland's chase.
Afghan and Nabi conjured 50 runs for the seventh wicket before the captain was run out by George Dockrell in the 33rd over.
Afghanistan lead the five-match ODI series 1-0, with three games to spare.
Brendan Taylor scored a fluent 59 to power Zimbabwe to a competitive total.