The big victory ended a six-match losing streak for the hosts.
26-year old Rahmat Shah becomes first Afghanistan batsman to score a hundred in Test cricket.
Taijul Islam became the fastest among Bangladeshi bowlers to reach into the milestone of taking 100 Test wickets.