The move comes as South African lawmakers were expected to debate a motion on Thursday calling for the closure of the Israeli Embassy in South Africa and the cutting of all diplomatic ties with the country until it agrees to a cease-fire.
Ramaphosa said his country believes Israel is committing war crimes and genocide in Gaza, where thousands of Palestinians have been killed and hospitals and public infrastructure have been destroyed.
"As South Africa we have accordingly, together with many other countries across the world, referred this whole Israeli government action to the International Criminal Court," Ramaphosa said Wednesday during a state visit to Qatar.
"We have put through a referral because we believe that war crimes are being committed there. And of course we do not condone the actions that were taken by Hamas earlier, but similarly we condemn the actions that are currently underway and believe that they warrant an investigation by the ICC," he added.
Ramaphosa's ruling African National Congress party, ANC, said it would support the motion tabled by the leftist opposition party Economic Freedom Fighters, EFF.
The EFF is calling for South Africa to shut down the Israeli Embassy and cut diplomatic ties with the country.
Israel and its supporters say Hamas is guilty of war crimes after the October 7 attack that led to the death of hundreds of Israeli citizens and the abduction of hostages.
The Middle Eastern nation says Hamas has military centers and weapons caches in schools and hospitals, using Gaza civilians as human shields.
The U.S., an ally of Israel, says it has intelligence to support the allegations.
On Wednesday, Israeli forces stormed into Gaza’s largest Al-Shifa hospital, searching for traces of Hamas inside and beneath the facility. Troops searched the underground levels of the hospital on Thursday and were accompanied by medical teams bringing in incubators and other supplies.
The military released video from inside Shifa showing three duffel bags it said it found hidden around an MRI lab, each containing an assault rifle, grenades and Hamas uniforms, as well as a closet that contained a number of assault rifles without ammunition clips.
The Associated Press could not independently verify the Israeli claims that the weapons were found inside the hospital.
Hamas calls Israel's allegations "nothing but a continuation of the lies and cheap propaganda, through which (Israel) is trying to give justification for its crime aimed at destroying the health sector in Gaza."