Only 17 wickets fell over five days and 1,289 runs were scored on a flat track as two batsmen from each side notched up individual hundreds.
Bangladesh posted 541-7 declared with Najmul Hossain Shanto (163) making his maiden test century and captain Mominul Haq (127) his first overseas hundred.
Dimuth Karunaratne led the hosts' reply with a career-best 244 as Sri Lanka posted 648-8 before declaring at lunch on the final day.
The home captain added 345 runs for the fourth wicket with Dhananjaya de Silva, who made 166, and they batted out the penultimate day without being separated.
Bangladesh lost two quick wickets in their second innings but Tamim Iqbal, who made 74 not out, and Mominul, who was unbeaten on 23, resisted the home bowlers before rain intervened.
"I was struggling in the first few overs, but I knew if I get a start and hang around, I can get a big one," Karunaratne said after being adjudged player of the match.
"We thought the wicket would have good pace and bounce, but in these conditions, with the heat, it was a bit flat."
Mominul said the Bangladesh bowlers tried hard but there was nothing in the surface for them.
"I'm happy as a captain to contribute for the team," he said of his century.
The second and final Test will be played at the same venue from Thursday.