Beckenham's County Ground will host the 50-over matches on 21 and 23 May as Sri Lanka warm up for June's ICC Champions Trophy, held in England and Wales.
The two sides last met at the 2015 World Cup, when Sri Lanka won by 148 runs in Hobart.
"To secure two opportunities to play Sri Lanka is so valuable for our team," head coach Grant Bradburn told Cricket Scotland's website.
"Our national team are desperate to play as much quality cricket as possible to keep advancing and the growing skills and depth across our whole Scotland performance squads.
"Despite these games not being official one-day internationals, we will treat them as if they are. Any chance to play a full member team is brilliant for our development and we look forward to fielding a side that resembles our strongest possible line-up.
"Wherever we play in the world there are Scots who love cricket and we look forward to welcoming them to Beckenham for what we are sure will be two great occasions."
The Champions Trophy will be held from 1-18 June, and Sri Lanka will play India, Pakistan and South Africa in Group B.
Scotland will play two warm-up matches against Sri Lanka in Kent in May.