Chasing 148 for victory, the Tigers found themselves under pressure after losing both openers Tanzid Hasan and Parvez Hossain Emon cheaply.
Debutant Saif Hassan struck a brisk 18, but at 24 for 3, Bangladesh looked vulnerable.
Skipper Jaker Ali (32 off 25) and Shamim Hossain (33 off 22) steadied the innings with a 56-run stand before Nurul Hasan’s composed 31 not out off 21 balls guided Bangladesh home.
Shoriful Islam added a crucial unbeaten 11 down the order as Bangladesh reached 150 for 8 in 19.1 overs. Azmatullah Omarzai starred with the ball for Afghanistan, taking 4 for 23.
Earlier, Afghanistan posted 147 for 5 after being sent in to bat. Ibrahim Zadran top-scored with 38, while Rahmanullah Gurbaz added 30.
Mohammad Nabi’s late cameo of 20 off 12 balls lifted the total. Bangladesh’s spinners made the key breakthroughs, with Nasum Ahmed (2 for 25) and Rishad Hossain (2 for 45) sharing four wickets. Shoriful Islam impressed with 1 for 13 in his four overs.
The win followed Bangladesh’s four-wicket triumph in the series opener, ensuring the Tigers clinch the T20I series 2-0 with one game still to play.
The final T20I will also be held in Sharjah on October 5.