The 37-year-old left-hander will retire after the second of the three test matches in the series.Sangakkara is currently playing in the second test match against Pakistan in Colombo and has opted out of the third and final match.
"I have decided to call it a day on my international career during the second test of the Indian series," he told reporters at the end of day three at P. Sara Oval.
He said that he had planned to retire soon after the World Cup earlier this year but decided to prolong his career at the selectors' request.
"Following discussions with the previous selection committee, I gave my word that I will be available for these two series but at the same time I said I would be unable to play six test matches but I would do four," he said.
Already retired from limited-over internationals, Sangakkara is playing in his 132nd test match and has scored 12,271 runs at an average of more than 58.
He has 38 test centuries and 52 half-centuries and is ranked the third best batsman currently playing test cricket.
Sangakkara is also the fifth highest run scorer in test cricket.
"My father asked me a couple of years ago in Kandy when I was at home with him, 'Don't you think it's time to start thinking about retirement?" the batting great said.
"When I came back home and, speaking to my wife, it actually made some sense," he said. "It actually struck home maybe it is time that I really paid attention to what's happening."
Sangakkara quit one-day internationals after the World Cup in Australia and New Zealand and retired from Twenty20 internationals last year after becoming part of Sri Lanka's World Twenty20 champion side.
Sangakkara said that he would continue to play cricket and has signed a two-year contract with English county Surrey.
Sangakkara to retire during India series
