Replying to Bangladesh's 265 runs, Afghanistan looked to be well in control when Hashmatullah (72) and Rahmat Shah (71) put on a solid 144 runs for the third wicket partnership.
Shakib Al Hasan (2-26) broke the stand before the hosts clawed their way back to dismiss Afghanistan for 258 runs in the last ball of the final over, and took 1-0 lead in the series.
Sunny, Taskin bowling actions cleared by ICC
Taskin, who was cleared to bowl by the International Cricket Council (ICC) just two days ago, held his nerve in the final over, when Afghanistan needed 13 runs, but the visitors, who lost their last six wickets for 28 runs, could manged just five.
"We knew this game was going to be tricky," said Shakib, who won the man-of-the-match award for his all-round performance. "We are playing ODIs after almost a year. We were careful and short by 20 runs," he said.
Tamim Iqbal and Mahmudullah Riyad earlier struck half-centuries to guide Bangladesh to a respectable total after skipper Mortaza won the toss and elected to bat first.
Bangladesh's Shakib escapes helicopter crash
The home side, playing their first ODI in 11 months, suffered a blow in the first over when Dawlat Zadran dismissed Soumya Sarkar for a duck, but the top order soon regained the initiative.
Tamim struck nine fours in his 80 off 98 balls and in the process became the first Bangladeshi cricketer to score 9,000 runs in international cricket.
He put on 83 with Imrul Kayes (37) for the second wicket and then another 79 with Mahmudullah for the third wicket before being removed by Mirwais Ashraf.
Mahmudullah smashed 62 off 74 balls and looked poised for a big innings after reaching his half-century with a boundary off Dawlat. However, experienced off-spinner Mohammad Nabi removed the middle-order batsman when Ashraf took a fine catch diving forward at backward square leg.
Afghanistan made a good comeback when Mushfiqur Rahim (six) and Sabbir Rahman (two) fell cheaply. But Shakib ensured Bangladesh did not lose their way with 48 off 40 balls.
"Last three months we were working hard, but the way we played we were not up to the mark. We could have scored 280-plus, but the set batsmen got out," said Bangladesh skipper Mortaza.
Dawlat claimed four wickets for 73 while Nabi and spinner Rashid Khan grabbed two wickets each for Afghanistan.
Afghanistan skipper Stanikzai hailed the performance of Bangladeshi bowlers. "Congratulations Bangladesh. Their bowlers bowled very well, that's why they won the match," Stanikzai said.
The second and third match will be held at the same venue on September 28 and October 1.
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