Three of the children sustained serious but not life-threatening injuries and remain in a stable condition. All the wounded children are receiving hospital treatment.
To express his dissatisfaction, Xicheng district said, Jia wielded a hammer that he normally used for work to injure students during a class at 11:17am local time (03:17 GMT).
Parents gather at an entrance gate to the Beijing No. 1 Affiliated Elementary School of Xuanwu Normal School following an attack in Beijing, China, Tuesday, Jan. 8, 2019.
The Xicheng government did not give other details of the attack, but posts on social media said the children suffered knife wounds to the head.
A film of a meeting between school staff and parents soon after the incident circulated widely on social media, in which parents were told a "school worker" had carried out the attack on second grade pupils.
About six police cars were parked outside a hospital near the school, according to a Reuters witness.
"The children were attacked while they were doing exercises on the school running track".
Jia was a migrant worker from Heilongjiang province whose contract had ended at the start of the year, and police suspect that the attack was motivated by anger at having his employment terminated. In October last year, a 39-year-old woman was detained on suspicion of stabbing 14 children at a kindergarten in Chongqing.
In January 2017, a man in southern China stabbed and wounded 12 children with a vegetable knife.
Many schools in China have increased security in recent years following violence against students and family members.