At the party’s elective conference he defeated Nkosazana Dlamini-Zuma - the ex-wife of President Jacob Zuma whom he succeeds.
"We declare comrade Cyril Ramaphosa the new president of the African National Congress," an official told party delegates in Johannesburg.
The victory puts Ramaphosa in line to succeed President Jacob Zuma, whose reign has been plagued by corruption scandals, economic slowdown and growing anger at the once-omnipotent party.
Zuma was seen as backing his former wife Dlamini-Zuma, allegedly to secure protection from prosecution on graft charges after he leaves office.
RFI's Jean-Jacques Cornish in Pretoria says Ramaphosa’s task of restoring faith in the ANC and the South African Government is complicated by the election of Dlamini-Zuma supporters to three of the party’s executive posts.
President Zuma stepped down as party chief at the conference but could remain as head of state until the 2019 election.
Our correspondent says Ramaphosa has prescious little time to prove he is up to the task.
"The first few weeks are absolutely critical, he will need either a caretaker president to uphold the constitution or step in and do the job himself.
"One of the first things he'll need to do is fire anyone linked to the powerful Gupta family."