In a statement, Ramaphosa called for an immediate return to civilian rule and for the military to return to their barracks.
Ramaphosa, who is the current chair of the African Union, said he condemned the unconstitutional change of government in the west African country.
President Ramaphosa urged the people of Mali, political parties and civil society, to observe the rule of law and engage in peaceful dialogue in order to resolve their challenges.
“President Ramaphosa calls for an immediate return to civilian rule and for the military to return to their barracks,”the African Union said in a statement.
Keita resigned and dissolved parliament late on Tuesday just hours after mutinying soldiers detained him at gunpoint, plunging a country already facing a jihadist insurgency and mass protests deeper into crisis.
President Ramaphosa demands that the Malian military release from detention the President, the Prime Minister, Ministers and other Government executives.
Keita was the target of mass protests since June, with people saying his seven year rule was flawed with corruption.
The country is a key ally to West in the battle against jihadist threat in the region.
Ramaphosa further urged African leaders and the entire international community to denounce and reject the military-led unconstitutional change of government and to assist the people of Mali to return to civilian and democratic rule.