It is understood the knife attack took place outside the school gates, with five people rushed to hospital as bystanders tried to intervene.
Three children were hospitalized, but none of them were life-threatening.
The attack took place in the mid-afternoon in the northwestern Haidian district of Beijing, and a 50-year-old man was arrested at the scene.
The man, surnamed Tang, is now being investigated by the police.
Footage shared on social media shows two school-aged children on the ground.
Photos from the scene also show a man with a bloodied face being held on the ground.
Multiple knife attacks have taken place in China this year, with a number of them involving school-aged children.
Last month, a 10-year-old Japanese student died after being stabbed near his school in the southern city of Shenzhen.
Another attack in June at a school bus stop for a Japanese school in Suzhou injured a woman and her child.
A Chinese woman who tried to intervene was killed.
In early October, three people were killed and 15 others injured in a knife attack at a supermarket in Shanghai.
China severely restricts private gun ownership, making knives and improvised explosive devices among the most common weapons.
Investigations into the latest attack are ongoing.