In other classrooms, students prevented the man from breaking in by using their bodies to barricade the doors.
The primary school, which has more than 300 students, had no one standing guard at its gates. Anyone was free to go in and out, according to Chinese media reports.
Earlier on Friday, Min is believed to have broken into the house of Xiang Jiaying, an 85-year-old woman, and wounded her with a knife he stole from her kitchen before the attack at the school.
The police managed to seize the suspect with the help of village officials outside the school.
Min is believed to be mentally ill and to have epilepsy.
His father, Min Zheng'an, told West China City Daily his son has had epilepsy since 1991 and that the symptoms of his condition had become more serious since April, media reports said.
The police arrived at Min Yingjun's home on Friday evening and left with his medical records and medication, his father said.
Zhang Zhixun, a resident in Min's village, said the suspect used to have about four seizures a day.
Residential building collapses in E China's Ningbo