Mr Zuma had faced intensifying calls from his former party, the ruling ANC, party to step down.
In a television address, he said: “I fear no motion of no confidence or impeachment … I will continue to serve the people of South Africa and the ANC. I will dedicate my life to continuing to work for the execution of the policies of our organisation.
“No life should be lost in my name. The ANC should never been divided in my name. I have therefore come to the decision to resign as president of the republic with immediate effect.”
The 75-year-old’s tenure has been dogged by allegations of corruption in recent years, and he has been under pressure to quit since December.
Cyril Rampahosa, who replaced Mr Zuma as leader of the ANC in December, is believed to have travelled to the president’s home to personally tell him to step down.
Mr Zuma has always denied allegations of corruption. But in 2016 the country’s highest court ruled that he had violated the constitution by failing to repay government money spent on his private residence.
He is also facing 18 counts of corruption, fraud, racketeering and money laundering in relation to an arms deal in 1999.
Additional reporting by the Associated Press