Kallis will continue to play in the One-Day Internationals and he has so far scored 11,574 runs from 325 ODI matches and has taken 273 wickets at an average of 31.79.
The burly South African, who made his Test debut against England here in December 1995, acknowledged that the script could not have been better.
"It's been incredible, the way people have come out to support me, the way CSA and my team-mates have made it a special game. I could not have asked for more," Kallis said after South Africa clinched the two-match series against India 1-0 here.
"Tough call (to retire from Tests). I still had the same butterflies ahead of this game, thanks to M S (Dhoni) and the (Indian) team for the guard of honour, I was glad I didn't face the next ball then," said Kallis who hit 115 in South Africa's first innings. He did not need to bat in the second innings.