Published: 2017-03-11 14:32:48 BdST
Leading the side in the absence of injured regular skipper Angelo Mathews, Herath mowed down the Bangladesh middle and lower order as the tourists, chasing a mammoth 457-run victory target, collapsed for 197 an hour after the lunch break.
Bangladesh began the final day needing 390 runs for an improbable win at a ground where no team has scored more than 300 in the fourth innings. They received an early jolt, losing opener Soumya Sarkar to the second delivery of the day.
Sarkar could not add to his overnight score of 53 and was bowled by Asela Gunaratne and the tourists kept losing wickets regularly.
Bangladesh captain Mushfiqur Rahim (34) joined forces with Liton Das (35) to hold off Sri Lanka's victory charge for 19-odd overs before the wheels came off.
Herath struck twice in the 27th over, dismissing Shakib Al Hasan and Mahmudullah in the space of three balls to equal New Zealander Daniel Vettori's 362 Test wicket mark.
Herath, who turns 39 on March 19, dismissed Liton to enter the record books and went on to complete a nine-wicket match haul which took his tally to 366 in 79 matches.
Colombo hosts the second and final Test from Wednesday.