Scotland had secured an historic victory when the sides met at the County Ground on Sunday, but there was no repeat as an unbeaten 74 from Kusal Mendis safely guided Sri Lanka past the modest target of 166.
Sri Lanka, warming up for the Champions Trophy, won the toss and soon put Scotland on the back foot as Kyle Coetzer, who scored 118 on Sunday, was out in the third over with just five runs on the board.
Fellow opener Matthew Cross, also a centurion in Scotland's win, went for 27, with only Craig Wallace able to enjoy any success as he made 46.
Left-armer Lakshan Sandakan returned four for 39 from his 10 overs.
Scotland's total never really looked likely to be enough, and so it proved.
After Niroshan Dickwella went for 29 to a catch from Mark Watt off Alasdair Evans, Sri Lanka brought up three figures in the 15th over before Tharanga, who made 53 not out, and Mendis coasted them home.
Sri Lanka ended with 170 for one from 22.5 overs.