Fast bowler Taskin Ahmed claimed career-best figures of 4-37 as Afghanistan were dismissed for 115 on day four, having been set a daunting target of 662.
Najmul Hossain helped the hosts set the tone for victory with a century in each innings, becoming the second Bangladesh batter to achieve that milestone.
Bangladesh’s biggest previous win was by 226 runs against Zimbabwe in 2005.
Saturday’s margin in Mirpur is lower only than England’s 675-run win over Australia in 1928, and Australia’s 562-run win over England at The Oval in 1934.
Bangladesh’s pace attack dominated. As well as their wickets tumbling, Afghanistan had to deal with two batters being unable to continue after being hit by rising deliveries, including last man in Zahir Khan.
“It was amazing to see the way bowlers responded in this heat,” Liton Das said after picking up a victory on his captaincy debut.
“Now we can say we have a quality pace attack.”
Amid the resistance of Rahmat Shah, who made a team-high 30 for Afghanistan, Bangladesh’s fast bowlers kept striking with left-arm paceman Shoriful Islam getting a double breakthrough in consecutive overs.
Shoriful (3-28), had Afsar Zazai (six) caught at gully and then dismissed Bahir Shah (seven).
Bahir was substituted in when skipper Hashmatullah Shahidi retired hurt on 13 after being hit by a Taskin bouncer on Friday.
Taskin then got into the act, breaking the defence of Rahmat, who was caught behind with Afghanistan at 6-91.
He also got the better of Karim Janat (18) and Yamin Ahmadzai (one) to stand on the brink of his first five-wicket haul in an innings.
Bangladesh were dismissed for 382 in their first innings, after a counterattacking 146 by Najmul.
The hosts decided against enforcing the follow-on after Afghanistan, in their first Test since 2021, were dismissed for 146 in reply.
Najmul posted 124 in the second innings.
Mominul Haque ended a two-year century drought with 121no, helping Bangladesh reach 4-425 before declaring and setting Afghanistan an improbable 662-run target.
“It didn’t go our way from the start of the match but we had some positives,” Afghanistan captain Hashmatullah said.
“The thing was we played after a long break in Tests. We will learn much more as as we play Test cricket.”