Winning the toss and opting to bat first, Bangladesh posted a total of 248 runs, being all out in 45.5 overs.
Parvez Hossain Emon was the top scorer for Bangladesh with 67 runs off 69 balls, marking his maiden ODI half-century.
Towhid Hridoy also contributed with 51 runs off 69 deliveries.
For Sri Lanka, Asitha Fernando was the pick of the bowlers, taking 4 wickets for 35 runs in his 9 overs.
Wanindu Hasaranga claimed 3 wickets for 60 runs in 9.5 overs, including one maiden.
In response, Sri Lanka managed to score only 232 runs before being bowled out in 48.5 overs.
Janith Liyanage led the chase with 78 runs off 85 balls, while Kusal Mendis contributed a brisk 56 runs off 31 deliveries.
Tanvir Islam was the star performer for Bangladesh with the ball, taking 5 wickets for 39 runs in his 10 overs, including two maidens.
This was his first five-wicket haul in an ODI.
Tanzim Hasan Sakib also chipped in with 2 wickets for 34 runs in 4.5 overs.
With this result, the three-match ODI series is now level at 1-1.
The third and final match between the two teams is scheduled to be played on July 8 at the Pallekele International Cricket Stadium in Kandy, starting at 2:30 PM Sri Lanka time.