Defending his role in the struggle against white minority rule, Ramaphosa told parliament he had "refused" under "vicious" interrogation to give evidence against struggle companion Mosiuoa Lekota and others.
Lekota, a fellow anti-apartheid activist who later defected from Ramaphosa's ruling African National Congress (ANC) to form an opposition party, told lawmakers Wednesday that the president had given information to the secret police to avoid being sent to jail on Robben Island.
Ramaphosa never went to Robben Island, unlike Nelson Mandela, Lekota, and other anti-apartheid campaigners.
He was detained twice: once held in solitary confinement for 11 months in 1974, and then jailed for six months in 1976.
"I was arrested and transported to Pretoria central prison," Ramaphosa said of his first arrest in 1974.
"They started to interrogate me, which was quite vicious. They wanted me to give evidence against (Lekota). I refused. My neighbour (in prison) went and gave evidence."
Ramaphosa said he told his father, a policeman, that "I am not going to do it -- I will never betray the comrades I was working with."
Ramaphosa added that when he was re-arrested in 1976, police warned he would "go and break rocks on Robben Island like Nelson Mandela."
"I said: 'In the end, I'd rather go and break rocks and I will never, ever betray my people'," Ramaphosa told parliament, to applause from the ruling ANC benches.
Lekota said that Ramaphosa had written to the special branch police to accuse him and others of being communists -- a punishable offence at the time.
"You condemned us... The special branch rewarded you... and they sent you home," Lekota charged.
"We should have travelled together to the island to serve years for the struggle of our people."
Ramaphosa was born in Soweto and was a student activist before becoming an trade union leader.
He was a key negotiator in talks in the early 1990s between the white minority National Party and the anti-apartheid movement, which led to the end of South Africa's system of legalised racial oppression.
He was widely seen as Mandela's chosen successor but instead became a wealthy businessman before returning to politics.
Ramaphosa became president last year after the ousting of his predecessor, Jacob Zuma, who faces a multitude of corruption allegations.