Ramaphosa won following a heavily contested race with Nkosazana Dlamini Zuma.
A mere 179 votes separated Ramaphosa from his rival. He won by 2440 votes, while Dlamini Zuma received 2261 votes.
He takes over from outgoing ANC president Jacob Zuma.
Mpumalanga Premier David Mabuza, who had been squarely in Dlamini-Zuma's camp, beat Human Settlements Minister Lindiwe Sisulu with 2,538 votes to 2,159 in the race for the deputy presidency of the party.
Outgoing secretary general Gwede Mantashe was elected as chairman of the party. His former position went to Free State Premier Ace Magashule, who along with Mabuza, could test Ramaphosa's skills as a political negotiator and unifier of a party that earlier on Monday acknowledged deep concern at its declining support at the polls.
Long-time Zuma loyalist Jessie Duarte was re-elected deputy secretary general with 2,474 votes to Zingiswa Losi’s 2,213, while Paul Mashatile, a former Gauteng premier and arts minister has become treasurer-general.
Mashatile was seen as part of "Team Ramaphosa" going into the conference and has stressed the need for revival in the ANC.
Reaction within the Nasrec centre was mixed during the announcement, with disappointment palpable on the faces of some delegates.
However, the rand soared to its highest level against major currencies in months as news broke of Ramaphosa's victory.
May he Lead this Country for the better please!😭😭💥
Ace, Jessie, DD. Good Luck Cyril. You will need it. Shem.
The future is exciting #CR17
I hope the New President will be able to contain the Guptas he will be working with!! #CR17