"They were all sitting together during lunchtime and after break they complained of tummy aches and high temperatures and were then taken to hospital," spokesperson Phumla Sekhonyane said.
They were certified dead at the hospital.
The food which possibly killed the three Emma Primary School pupils in Winterveldt, north of Pretoria, has been sent for testing.
The school runs a feeding scheme, but Sekhonyane said there had been no reports of illnesses from children who had eaten the school's food.
The department has quarantined all the food served at the school as a precautionary measure, she added.
Education MEC Panyaza Lesufi has visited the school.
He has called on the school principal to have a meeting with parents, explaining what happened. He has also pledged the department's support as well as a comprehensive investigation into the matter.
"He will also visit the families of the deceased to pay condolences," Sekhonyane said.
A team of the department's psychosocial unit has also been sent to the school to provide counselling and pastoral care to the families of the deceased, fellow pupils, and teachers.
-SAPA