Russian President Vladimir Putin and Ukrainian President Volodymyr Zelenskyy have "agreed to receive the mission and the African heads of state, in both Moscow and Kyiv," Ramaphosa said.
Ramaphosa said he had held "separate telephone calls" with Putin and Zelenskyy over the weekend, where he presented an initiative drawn up by Zambia, Senegal, the Republic of Congo, Uganda, Egypt and South Africa.
"I agreed with both President Putin and President Zelenskyy to commence with preparations for engagements with the African heads of state," Ramaphosa said.
"We're hoping we will have intensive discussions," he said, speaking at a press conference in Cape Town during a state visit by Singapore Prime Minister Lee Hsien Loong.
U.N. Secretary-General Antonio Guterres and the African Union (AU) have been briefed on the initiative and welcomed it, Ramaphosa added.
Ramaphosa did not give a specific timeline for the visit or other details, saying only that the conflict had been "devastating" and Africa "is also suffering a great deal" from it.
African countries have been badly hit by rising prices of grain and by the impact to world trade.
The announcement came a day after Ramaphosa said South Africa had been under "extraordinary pressure" to pick sides in the conflict, following accusations from the United States that Pretoria supplied weapons to Moscow - a move that would break with its professed neutrality.