Ramaphosa was chosen without a vote after being the only candidate nominated, chief justice Mogoeng Mogoeng told assembled lawmakers at a special sitting of the parliament in Cape Town.
The announcement brought loud cheers from ANC lawmakers, with Ramaphosa due to address the parliament later during proceedings.
Zuma resigned on Wednesday as the ANC finally turned against him after a nine-year reign dominated by corruption scandals, economic slowdown and plummeting electoral popularity.
Zuma railed against the ANC for “recalling” him from office and — when he at first refused to resign — then threatening to oust him via a parliament no-confidence vote.
In an earlier TV interview on Wednesday, Zuma said he had received “very unfair” treatment from the party that he joined in 1959 and in which he had fought for decades against apartheid white-minority rule.
Zuma had been in a power struggle with Ramaphosa, his deputy president.
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 to become the new party leader.