The Asian side dominated the match, which was reduced to 35-overs-a-side, to win by 29 runs on DLS method.
Chasing a challenging 138-run target, Pakistan were held to the final over and won on a wide off the last delivery of the match in the first-ever Twenty20 international between the two countries.
Pakistan captain Misbah-ul Haq Saturday praised the Afghan team's fighting spirit despite their loss in a one-day international to his side, saying they could give other teams a tough time.