The man killed his neighbor after an argument and then took the students hostage before police subdued him, state media reported.
The violence in the village of Luoying in Henan province comes amid a series of deadly attacks on Chinese schools, mostly blamed on people with psychiatric problems or acting on a grudge.
Police said Yang Xinlong hacked a neighbor to death and injured another during an argument shortly before noon on Wednesday, according to the official Xinhua news agency. He then charged into the school and took 19 children hostage.
Police opened fire after Yang refused to surrender, and he was later hospitalized with gunshot wounds, the report said. No details were given about the student who was killed.
Calls to the Luoying primary school and police in the surrounding district of Dengzhou were unanswered. There were no numbers listed for police in Luoying and calls to the local government office were answered by a recorded message.
The killing follows the deaths earlier this month of three kindergarten students in an arson attack in the city of Gongyi, also in Henan. The province is China's most heavily populated, with a reputation for bad governance, poverty and high crime levels.
Other incidents have included the wounding of 16 children and two adults at a school in the central province of Anhui in October by a man armed with six guns.
In 2004, a man with a history of mental problems killed a child and wounded others in a knife attack at a kindergarten a few hundred yards from the Beijing compound where President Hu Jintao and other leaders live and work.
Local authorities were ordered in March to post police guards at schools and take other measures to boost security, although it's unclear how widely those measures have been carried out.