Scotland batting first posted 259 for nine in its 50 overs. In its reply, Afghanistan chased down the target to end at 260 for five.
Earlier, Kyle Coetzer (133: 136b, 14x4, 2x6) and Josh Davey (64: 90b, 6x4, 1x6) added 134 runs for the second wicket for Scotland.
But thereafter there was a collapse as Scotland lost wickets at regular intervals.
For Afghanistan, Dawlat Zadran (2-47), Samiullah Shenwari (3-42) and skipper Mohammad Nabi (2-53) were the key wicket-takers.
In its chase, Afghanistan had handy contributions from its top-order, especially Mohammad Shahzad who slapped 48 off 34 balls with five boundaries and three sixes.
With Afghanistan at 160 for four, skipper Nabi (51: 44b, 5x4) and Shenwari then joined forces to help force the issue.