Du Preez, 33, will continue to be available for T20 franchise leagues though. She is currently contracted to Trent Rockets in the Women's Hundred and Hobart Hurricanes the WBBL.
"Fifteen years of international cricket, wow, what a blessing it has been," du Preez said in a retirement note circulated by Cricket South Africa. "It's never an easy decision to step away from something you love as much as I love cricket, but I know in my heart that the time is right for me to announce my retirement from all forms of international cricket.
"However, I will still continue to play the shorter format of the game in the global leagues until such a time that I am blessed to become a mom and start a family of my own...
"I will definitely miss the change-room chats, the off-field friendships from all around the globe, travelling and learning about different cultures. However, I am extremely excited about the next phase of my life together with the ones that I love dearly and that have taken a back seat during the last 15 years of my career."
She took over as full-time captain in 2011 and led the team for five years before stepping down to focus on her batting. In all, she led South Africa in 46 ODIs, 50 T20Is and the only Test the team has played since her debut.
"This is a bittersweet moment for South African cricket and the world at large as we bid farewell to one of the game's favourite characters on the international stage," Enoch Nkwe, CSA's director of cricket, said.
"Over the last 16 years, du Preez's professionalism and commitment shown towards her country has been exemplary... Her devoted, passionate team-first personality will be sorely missed, and I wish her the very best with the rest of her career and life after the game."