Chasing 189, Afghanistan were reduced to 50 for 3, before Darwish Rasooli who struck an unbeaten 78-balls 76, in the company of wicketkeeper Ikram Ali Khil.
Rasooli shared partnerships of 75 with Khil (46), 42 with Nisar Wahdat (19) and 27* with Azmatullah Omarzai (12*) to carry Afghanistan home with 15 balls to spare.
After Pakistan had chosen to bat, they lost opener Muhammad Zaid for 0 and No. 3 Ammad Alam for 1. Wicket-keeper Rohail Nazir resurrected the innings in the company of Ali Zaryab Asif (30). The pair put on 88 off 138 balls.
Nazir’s dismissal for 81 sparked a collapse as Pakistan gave away their last seven wickets for 42 runs. Fast bowler Omarzai and legspinner Qais Ahmad picked up three wickets apiece.
Afghanistan are placed in Group D along with Pakistan, Sri Lanka and Ireland. The team will face Sri Lanka in their next match of the tournament on Wednesday.