Khan's 4-12 helped restrict Bangladesh to 134-8 as the hosts surpassed the modest total to win by six wickets and take an unbeatable 2-0 lead in the three-match series.
Samiullah Shenwari, who hit 49 off 41 balls, and Mohammad Nabi, with an unbeaten 31, took Afghanistan home with seven balls to spare.
The Afghans seemed to be in trouble at 79-3 in the 14th over but Nabi smashed three fours and two sixes to ensure smooth sailing for his team during his 15-ball blitz.
But it was the 19-year-old Khan who set up the victory with his triple strike in an over and was poised to claim a hat-trick after sending back Tamim Iqbal, who top-scored with 43, and Mosaddek Hossain on consecutive deliveries.
Abu Hider denied Khan the hat-trick and went on to hit an unbeaten 21 off 14 balls to give the Bangladesh total respect after the visitors elected to bat first.
Khan, who had also starred in Afghanistan's opening win of the series with his three wickets, got his second man of the match award.
Nabi also got two crucial scalps and even though fellow spinner Mujeeb Ur Rahman went wicketless the teenager gave away just 15 runs in his four overs.
Bangladesh off-spinner Mosaddek took two wickets to try and choke Afghanistan in their chase but the Bangladesh did not have enough runs on the board for their bowlers to defend.
The Asghar Stanikzai-led Afghanistan, who are tuning up for their debut Test against India starting June 14, are scheduled to play the final match of the series on Thursday at the same venue.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ