The 36-year-old made the announcement through a statement on his instagram page.
"It has been a year of refinement in the fire for us all. Uncertain were the times but they brought clarity for me in many aspects. My heart is clear and time is right to walk into a new chapter," du Plessis posted.
"It has been an honour to play for my country in all formats of the game but the time has come for me to retire from Test cricket."
Du Plessis said his focus now shifts to T20 cricket but ODIs will also remain a part of his plans.
"The next two years are ICC T20 World Cup years. Because of this my focus is shifting to this format and I want to play as much of it as possible around the world so that I can be the best player I can possibly be.
"I strongly believe I have a lot to offer to the Proteas in this format. This does mean that ODI cricket is no longer in the plans, I am just making T20 cricket priority in the short-term," he said.
Du Plessis played 69 Tests, scoring 4163 runs at an average of 40.02 including 10 hundreds and 21 fifties.
He stepped down as South Africa's Test and T20 captain last year after taking over from the charismatic A B de Villiers back in 2016.
. "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.
"I stand in a place of utmost gratitude for a Test career full of blessings bestowed on me. Every high and low has shaped me into the man I am proud to stand up as today," he added.
Du Plessis had wanted to say goodbye to the longest format after the home series against Australia scheduled later this month but it has now been postponed indefinitely due to the COVID-19 pandemic.
(Only the headline and picture of this report may have been reworked by the Business Standard staff; the rest of the content is auto-generated from a syndicated feed.)