It happened at Anlaby Primary School in Hull on Friday. The child has not been named.
Head teacher Gareth May said in a statement: "The whole school community is deeply saddened by this tragic event and the thoughts of everyone connected with the school are with the child's family."
Staff and pupils will receive support at the school over the coming days.
A five year-old boy has choked to death during a school dinner break.