Left-arm spinner Herath finished with figures of seven for 89 and included his 200th Test scalp to leave the Tigers staring defeat firmly in the face after being bowled out for 265 in their second innings.
Resuming on 158 for four overnight, the tourists' attempts of setting a more challenging total were undermined by the steady fall of wickets on the fourth morning.
Mominul Haque departed in the first over of the day, bad-pad to Herath having added just one run to his overnight 36.
Captain Mushfiqur Rahim hit the same bowler for six to relieve the pressure, but Herath would seal his five-for when Nasir Hossain was bowled for a seven-ball duck.
Sohag Gazi added a quickfire 26 - which included three fours and a six - before he lofted to long-on off Herath, who celebrated his 200th Test wicket when Rahim's resistance ended as he faintly edged to Angelo Mathews at slip having made 40 off 87 balls.
Despite seeing an inside edge off Rubel Hossain put down by Dimuth Karunaratne at slip, bowler Tillakaratne Dilshan would have the last laugh in his next over when he bowled the tail-ender.
Abul Hasan (25 not out) provided some late impetus with two booming sixes off a Dilshan over as well as another maximum off Herath, but last man Robiul Islam was undone by Shaminda Eranga's inswinging yorker to end Bangladesh's innings with the last ball before lunch.
- Sports & Recreation