The 38-year-old left-hander will end his Test career after the ongoing first Test against England at the Asgiriya stadium here, but will continue to play limited-overs cricket.
"Sanath has decided to retire from Test matches," Sri Lanka Cricket media manager Samantha Algama told AFP Monday.
Jayasuriya marked his last Test innings with a spectacular 78 earlier on Monday, an innings that included six boundaries in one over from James Anderson.
It was Jayasuriya's highest Test score in 16 Tests since the last of his 14 centuries in Karachi in 2005 and was reportedly under pressure from selectors to call it a day or be axed.
Jayasuriya's 6,973 runs from 110 Tests and 12,207 runs in 403 one-dayers are the highest by any Sri Lankan batsman. He has also claimed 97 Test and 307 one-day wickets with his left-arm spin.
"I am retiring after this Test," Jayasuriya told reporters after the third day's play in the first Test which ended with Sri Lanka 74 runs ahead with eight wickets in hand.
"But I want to continue playing one-day cricket. I had decided before this match that I will retire after the Kandy Test."
Jayasuriya made his one-day debut against Australia in Melbourne on December 26, 1989, and played his first Test against New Zealand in Hamilton in February 1991.
His retirement comes the same day team-mate Muttiah Muralitharan overtook Australian Shane Warne's world record of 708 wickets to become the most successful Test bowler.