Sri Lanka, who drew the opening Test in Galle, achieved a 160-run target in the last session as opener Tillakaratne Dilshan (57) and Kumar Sangakkara (55) made impressive half-centuries.
Bangladesh, trailing by 106 runs on the first innings, were dismissed for 265 in their second innings in the morning session.
Tamim Iqbal (59), Jahurul Islam (48) and skipper Mushfiqur Rahim (40) were the main scorers for Bangladesh, while Sri Lankan left-arm spinner Rangana Herath finished with a career-best 7-89 on his 35th birthday.
The hosts on Monday were bowled out for 346 in their first innings in reply to Bangladesh's 240.
Bangladesh and Sri Lanka will now play a three-match one-day series, starting in Hambantota on Saturday.
Bangladesh 240 and 265; Sri Lanka 346 and 160-3
Photos: Katrina Kaif, Shamita Shetty at Mumbai airport
Photos: Varun Dhawan, Alia Bhatt promote 'Badri...' on 'Dil Hai Hindustani'
In pictures: 15 facts about kissing that will surprise you
Photos: Shahid Kapoor and Mira Rajput at cafe in Bandra
Photos: Deepika Padukone, Neha Dhupia and Soha Ali Khan at event