"I have only asked my party to articulate my transgressions and the reason for its immediate instruction that I vacate office," he said.
Zuma, 75, had been embroiled in a divisive power struggle with Ramaphosa, the deputy president.
Ramaphosa won control of the ANC when he was elected as its head in December.
Benchmark South African stocks scored their biggest gains since June 2016 after news that a pro-business reformist would be taking the helm.
The FTSE/JSE Africa All Share Index rose as much as 2.7 percent, while the rand reached its strongest level since February 2015, gaining 0.5 percent at 11.6570 to the dollar in early trade.
Zuma said in a TV interview earlier Wednesday that he had received "very unfair" treatment from the party he joined in 1959 and in which he had fought for decades against apartheid white-minority rule.
He said he was angered over "the manner in which the decision is being implemented... I don't agree, as there is no evidence of if I have done anything wrong."
'We are not celebrating'
The party's national executive committee had ordered Zuma's recall from office on Tuesday, after a 13-hour meeting at a hotel outside Pretoria, but he at first refused.
ANC officials then said that if Zuma did not resign, the party's lawmakers in the Cape Town parliament would vote out him on Thursday.
But, after the resignation, party deputy secretary general Jesse Duarte cautioned: "We are not celebrating".
"We have had to recall a cadre of the movement that has served this organisation for over 60 years, it's not a small matter."
Zuma, who had no formal education, was jailed on Robben Island for 10 years alongside Nelson Mandela under apartheid and rose through the ranks of the ANC to take power in 2009.
But his rule was dominated by graft scandals, economic slowdown and falling popularity for the celebrated liberation party.
In a day of high drama, police early Wednesday raided the Johannesburg home of the Gupta business family, which is accused of overseeing a web of corruption in Zuma's government.
Police said three unidentified people had been arrested in investigations into "Vrede Farm" - allegations that millions of dollars of public money meant for poor dairy farmers were siphoned off by the Guptas.
Local media reported that Zuma had been pushing for a resignation deal that included his legal fees to fight multiple criminal charges - but he denied the allegations in his resignation speech.
One case against him relates to 783 payments he allegedly received linked to an arms deal before he came to power.
Other graft allegations have centred on the three Gupta brothers, who are accused of unfairly obtaining lucrative government contracts and even hand-picking Zuma's ministerial appointments.
The political standoff in recent weeks plunged South Africa - the continent's most developed economy - into confusion over who was running the country, with last Thursday's annual State of the Nation address cancelled at the last-minute.
Ramaphosa will now deliver the address on Friday.
Decline of Mandela's party
Zuma, a Zulu traditionalist with four wives and a proud singing voice, had been scheduled to stand down next year after serving the maximum two terms.
In local polls in 2016, the ANC recorded its worst electoral result since coming to power in 1994 with Mandela at the helm as white-minority rule fell.
Ramaphosa, 65, must revive the economy and crack down on what he has admitted is rampant government corruption if he is to boost the party's tarnished reputation before a tricky general election next year.
He is a former trade unionist and Mandela ally who led talks to end apartheid in the early 1990s and then became a hugely wealthy businessman before returning to politics.
Zuma's hold over the ANC was broken in December when his chosen successor - his former wife Nkosazana Dlamini-Zuma - narrowly lost to Ramaphosa in a vote for the new party leader.