"She was on her way to a local tavern when she was allegedly attacked by the deceased and fought back," police said.
According to BBC reports the young woman stabbed the 21-year-old man, after overpowering him during a struggle.
South Africa has one of the highest incidences of rape in the world.
There has been a recent spate of killings of women in the country, which has sparked national outrage.
The girl was not asked to plead when she appeared in the Lenyenye magistrate court in the northern Limpopo province.
The suspect, who is a minor under South African law and cannot be named, would be assigned a social worker and possibly a trauma counsellor to assist with the case, according to the police.
"She was visibly distraught when she arrived at the police station and will receive the necessary care given in such cases," police colonel Moatshe Ngoepe said.
She is expected to tell the court that she acted in self-defence, when the case resumes on 14 June.