The left-handed batsman, ranked sixth in the world, has joined for the next three County Championship matches.
Karunaratne will debut on Thursday - his 34th birthday - against Northamptonshire at Wantage Road.
He will also play in the subsequent games against Kent at Headingley and Essex at Chelmsford.
Karunaratne’s capture is a major coup; he has scored 5,620 runs in 76 Tests at a lick under 40, with 14 hundreds.
Only Marnus Labuschagne, Steve Smith, Kane Williamson, Joe Root and Babar Azam are above him in the world Test rankings.
Darren Gough, the Yorkshire interim managing director of cricket, said: “We are delighted that Dimuth will be joining us for the next three Championship games.
“He has proven himself to be an exceptional leader for Sri Lanka and is a tremendous Test Match batter.
“It can only benefit the lads in our changing rooms to have a player of his quality, and I’m sure they will all get a lot from it.
“I’m confident he will contribute runs and enjoy his time at Yorkshire.”