The game was in the balance after the hosts ended day four on 253-8 , needing 33 runs to win with two wickets remaining.
Ben Stokes was the man to do the job for England as he trapped Taijul Islam (16) lbw after the hosts added 10 runs in the first few overs of the day.
The tourists won on review for both wickets as Shafiul Islam was also given out lbw off the bowling of Stokes, who was named man of the match.
Taijul’s dismissal came after the ball hit the pad when he tried to turn it to leg, and it was England who called for the review, which was successful.
Two balls later, Bangladesh challenged the umpire’s decision to send Shafiul packing after the ball hit his pad outside of the line of off stump, but they were denied.
In total, a record 26 decisions were reviewed in the Test.