Du Plessis, who played 69 tests, said in a statement on his Instagram account that it was time to “walk into a new chapter.”
He will concentrate on Twenty20s, the 36-year-old batsman said, with World Cups in that format this year and next. He added he wanted to play as much T20 cricket around the world as he could over the next two years and didn't rule out the possibility of continuing to play one-day internationals.
Also read: Faf du Plessis quits as South Africa cricket captain
Du Plessis' decision was accelerated by a lack of test matches in the immediate future for South Africa, mainly due to coronavirus. Australia was due to fly in for a series next month but canceled, citing the risks of touring during the pandemic.
“It has been a year of refinement in the fire for us all," du Plessis said in his statement. "Uncertain were the times, but they brought clarity for me in many respects.
"My heart is clear and the time is right to walk into a new chapter. It has been an honor to play for my country in all the formats of the game, but the time has come for me to retire from test cricket.”
Du Plessis became South Africa's test captain in 2016. He stepped down from that role in early 2020 but continued to play for the team and, in a sign of his longevity, made his highest test score in December when he hit 199 against Sri Lanka.
Also read: Du Plessis says bubble life is not sustainable for players
In all, he made 10 test centuries and 21 half-centuries but his first hundred, on his test debut, defined much of his career. He was called into the team in Australia in 2012 as an injury replacement and made 110 not out in the second innings under extreme pressure, grittily batting for more than seven hours to defy the hosts and save a draw for South Africa. It enabled his team to triumph in the series by winning the last test.
“His commitment to the team has always been undoubtable,” said Graeme Smith, South Africa’s director of cricket and the test captain when du Plessis made his debut.
Du Plessis' test debut at the age of 28 came much later than his friend and schoolmate AB de Villiers. They were both schoolboy stars but while de Villiers became a young prodigy for the national team, du Plessis had to wait and work for his opportunity.
Also read: Live with Tamim: Faf du Plessis expresses his interest to play in BPL
Ultimately, his contribution as a player and arguably a more natural leader than de Villiers, who he replaced as captain, was significant for South Africa's test team as it moved into a new era.
“If someone had told me 15 years ago that I would play 69 test matches for South Africa and captain the side, I wouldn’t have believed them," du Plessis said.