Beckham canceled the event at Tongji University, China's official Xinhua news agency reported. He is visiting China as an ambassador to the Chinese Super League.
Four university employees and a student were hurt, none of them seriously, Xinhua said.
The British newspaper The Daily Telegraph said local television showed footage of students with bloody injuries and at least one police officer knocked to the ground.
The Telegraph said about 1,000 students turned out to see Beckham. An appearance with actress Helen Mirren at a Shanghai hotel Wednesday night for an event honoring the birthday of Queen Elizabeth II set off a similar rush.
Beckham, 38, began his career at age 17 with Manchester United. He announced his retirement last month after helping Paris Saint-Germain win the French league title under a five-month contract.
18-year-old elf alleges mall Santa pinched her buttocks on the job
Kate Moss Playboy shoot is classic Playboy, classic Kate