Left-arm spinner Taijul Islam pegged the visitors back with two wickets after a solid start by the Afghans before Mahmudullah struck just minutes before the interval.
Taijul, who opened the all-spin bowling attack for the Tigers, became the fastest Bangladeshi to 100 wickets in Test cricket with the scalp of Ihsanullah for 9 before removing Ibrahim Zadran (21 off 69).
He is now the second highest wicket-taker in Tests for Bangladesh.
Earlier, Afghanistan won the toss and opted to bat first.
Captain Shakib Al Hasan leads a four-pronged spin attack with the likes of Mahmudullah, Mosaddek Hossain and Moninul Hoque making up the auxiliary options.
The Afghans have mirrored the Tigers’ spin-heavy approach with four specialist spinners of their own led by skipper Rashid Khan and the experienced Mohammed Nabi.
Afghanistan (Playing XI): Ihsanullah Janat, Ibrahim Zadran, Rahmat Shah, Hashmatullah Shahidi, Asghar Afghan, Mohammad Nabi, Afsar Zazai(w), Rashid Khan(c), Yamin Ahmadzai, Qais Ahmad, Zahir Khan