Bangladesh need 315-run to win the first ODI in the first match of the three-match series against Bangladesh on Friday.
Sri Lanka scored 314 at Colombo, riding on the century of Kusal Perera.
Kusal completed his ton off 82 deliveries with 17 fours and one six. It was his fifth century in ODI cricket. He ended up on 111 off 99 deliveries.
Kusal Mendis (43), Angelo Mathews (48) and Lahiru Thirimanne (25) also contributed well with the bat.
For Bangladesh, Shafiul Islam, who returned to the national team after three years, took the first wicket by removing Avishka Fernando for seven. Sri Lanka were then at 10.
However, in the second wicket stand, captain Dimuth Karunaratne and Kusal added 97 runs to repair the initial damage. Dimuth fell prey to Mehidy Hasan Miraz for 36 as the second Sri Lankan batsman.
The hosts never looked in trouble as Kusal Perera and Kusal Mendis added 100 runs in the third wicket stand. But Soumya Sarkar and Rubel Hossain removed them in two successive overs.