Bangladesh, needing 33 runs for what would have been their first win over England in nine attempts, added 10 runs to their overnight total and were all out for 263 after 20 minutes of play.
Sabbir Rahman, the overnight half-centurion, was left stranded on 64 as the allrounder Stokes dismissed the other two batsmen in his second over.
Stokes had Taijul Islam lbw for 16 following a successful review after umpire Kumar Dharmasena initially turned down a muted appeal.
The replay again came to England's favour as Hawk-Eye indicated that the ball was hitting off stump, meaning the umpire's initial decision stood.
Also Read
It brought an end to a thrilling battle between the two teams in a match dominated by spin.
Stokes was named man of the match for taking six wickets in the two innings and also scoring 85 in England's second innings.
The second and final cricket Test will start in Dhaka on October 28 before England then head to India for a five-Test tour.
Disclaimer: No Business Standard Journalist was involved in creation of this content