The brave youngster was stabbed with a broken bottle as he tried to stop the man allegedly attacking his mother Segomotso, she told police.
The incident was said to have happened as Segomotso was walking the boy and his older brother to school near the town of Jan Kempdorp in north-western South Africa's Northern Cape Province.
Segomotso said they were close to the school when she suddenly noticed a man following them.
She said: "The next moment I felt someone grab me by the shoulder, pulling on a school bag.
"[My son] slapped the man across the face and told him to let go of me.
"He kept on screaming 'let go of my mommy, it is my mommy', while slapping and kicking the man.
"I could feel that the man was pulling up my skirt with his other hand and realised that he wanted to rape me in front of my children."
The attacker allegedly slapped the six-year-old and he fell to the ground when Segomotso then managed to push her attacker away.
She added: "I saw that he now wanted to attack my son. I frantically looked for a weapon to use against him but could not find any.
"When [he] fell to the ground, I could see that the man was strangling him. Then his arm went up and down and I realised that he was stabbing my son with the bottle.