The skipper was left unbeaten on 122, including 13 fours and two sixes, which steered Bangladesh to their target on 4-257 in 44.4 overs on Wednesday after earlier dismissing Sri Lanka for 255 in 48.5 overs.
Shanto fittingly brought up the victory to give Bangladesh a 1-0 lead, hitting offspinner Maheesh Theekshana for a boundary through extra cover.
Mushfiqur Rahim was not out on 73 at the other end after sharing 165 runs for the undefeated fifth-wicket stand with Shanto.
"The bowlers should be praised because initially it was a tough wicket to bowl on, but they came back strongly," Shanto said.
Pacer Dilshan Madushanka swung the ball admirably to trouble Bangladesh batters, removing Liton Das with the first ball of the innings and then Soumya Sarkar for three.
His new ball partner Pramod Madushan also pegged back Bangladesh, getting rid of Towhid Hridoy for three.
Shanto and veteran Mahmudullah (37) steadied the team with 69-run for the third wicket.
After bringing up his fifty off 52 balls, Shanto raised his third century off 108 balls with a cracking cut for a four through cover region.
Bangladesh's three-pronged pace attack had earlier shared nine wickets amongst them to help the side bundle Sri Lanka in a moderate total.
Tanzim Hasan, who was used as third seamer, claimed 3-44 to give Sri Lanka the initial trouble before Shoriful Islam (3-51) and Taskin Ahmed (3-60) came to the party.
Janith Liyanage made team-high 67 off 69 with three fours and two sixes while captain Kusal Mendis hit a 75-ball 59.
But after opting to bat first, Sri Lanka made a rapid start with Pathum Nissanka and Avishka Fernando, sharing 71 runs in just 59 balls.
Tanzim broke through with the wicket of Fernando, who made run-a-ball-33.
Tanzim then dealt double blow, claiming the wicket of Nissanka who made 36 off 28 and Sadeera Samarawickrama in his consecutive two overs, to leave the visitors at 84-3 in 13.1 overs.
Offspinner Mehidy Hasan, who took 1-33 in 10 overs, slowed down Sri Lanka's innings as the run rate dipped below six.
He got the reward for his tight line and length when he got the better of Charith Asalanka for 18 with a delivery that spun sharply.
Mendis and Liyanage rebuilt the inning slowly but steadily. They combined for a 69-run for the fifth wicket and Sri Lanka appeared to set the platform well for a final flourish.
But disciplined bowling of Taskin and Shoriful in the death overs denied Sri Lanka setting a big target.