Sri Lanka Cricket (SLC) said Jayawardene, 37, has written a letter to the chief executive officer Ashley De Silva announcing his wish to retire from the longest version of the game.
"It was not an easy decision to make given that it has been a great privilege and honour representing my country during the past 18 years, but I believe this is the right time", Jayawardene was quoted as saying.
The veteran batsman will play two Tests against South Africa on July 16 and July 24, respectively, followed by a two-match series against Pakistan in August.
This would mean that Sri Lanka will not miss him during the World Cup 2015 to be hosted jointly by Australia and New Zealand.
More From This Section
Jayawardene, who made his Test debut against India in 1997, played 145 Tests scoring 11493 runs with 33 centuries and 48 fifties.
Jayawardene (22 and 79 runs) recently made his presence felt in a 100-run win against England at Headingley to give Sri Lanka their first Test series victory -- the Islanders won the two-match series 1-0 -- on English soil.