Police say at least 10 of the 17 people reported injured at the primary school in Guilin, Guangxi province, were school children.
Witnesses told Xinhua news agency they saw a three-wheeled vehicle pull up to the school before the explosion. The cause of the explosion remains unclear.
“First, the motorcycle caught on fire and then it exploded with a huge sound that could be heard from far, far away,” a witness told Xinhua news agency.
Those injured in the explosion at the Baijie primary school were taken to hospital, the news agency added.
The school has now been closed and the police are investigating the incident.
In recent years, China has seen a number of knife attacks at primary schools. As a result, many schools and kindergartens have significantly tightened security measures, correspondents say.