When the stumps were drawn, the home team was on 307 for 5.
Stand-in captain Mahmudullah and Mosaddek Hossain soaked up 106 balls to put the match beyond Sri Lanka's reach.
The star of the day and the entire game was Mominul Haque, who become the first Bangladesh player to hit centuries in each innings of a Test.
A total of 1533 runs was scored for 24 wickets in five days.
Bangladesh 1st innings: 513
Sri Lanka 1st innings: 713 for 9
Bangladesh 2st innings: 307 for 5
Mominul Haque 105
Liton Das 94
The second Test will start on 8th of February in Dhaka.