He had held separate phone calls with Russian President Vladimir Putin and Ukrainian President Volodymyr Zelenskyy, who agreed to host the African leaders in Moscow and Kyiv to discuss a potential peace plan for the conflict.
"My discussions with the two leaders demonstrated that they are both ready to receive the African leaders and to have discussion on how this conflict can be brought to an end," Ramaphosa told a joint press briefing with visiting Singaporean Prime Minister Lee Hsien Loong.
"Whether that will succeed or not is going to depend on the discussions that will be held," he said.
Senegal, Uganda, Egypt, the Republic of the Congo, Zambia, and South Africa will all be part of the mediation effort.
Moscow and Kyiv did not immediately comment on Ramaphosa's statement.
Pressure on South Africa to pick sides
The effort by African leaders is the latest in a string of foreign offers of mediation and peace talks. It comes after UN Secretary-General Antonio Guterres says peace talks in the Ukraine conflict are not possible at the moment.
But Ramaphosa said Guterres and the African Union (AU) have been briefed on and welcomed the initiative. He added the US and Britain had also expressed "cautious" support for the plan.
The South African leader gave no timeline for the visits but said the conflict had been "devastating," and African countries suffered "a great deal" from it.
Ramaphosa said South Africa would not be drawn "into a contest between global powers" despite having faced "extraordinary pressure" to do so.
South Africa has abstained from voting on UN resolutions on the war.
lo/jcg (AP, AFP, Reuters)