Chinese police were called to Ruijin Hospital on Saturday morning following reports of a man wielding a knife.
Videos on social media showed the chaos as visitors climbed under turnstiles to exit the hospital while medics were seen running with their patients, some in wheelchairs and one on a movable bed.
A long streak of blood was seen on the marble surface of a staircase in one video.
“It’s very shocking,” said a Shanghai resident who had arrived for a checkup just after the hospital was sealed off, declining to give her name. “It’s very heartbreaking. What happened to this company?
Reports of patients attacking medical staff are quite common in China, with hospitals facing problems including touts running an illegal business of appointment tickets in long queues to see doctors.
Local police said the man was using a knife to hold a crowd of people hostage on the seventh floor of the building.
They said they opened fire when he threatened to injure his hostages by “overpowering” him in the process.
None of the injured appear to be in life-threatening condition and the incident is being investigated, police said.
The hospital has been cordoned off and all appointments canceled and an investigation has been opened.
It comes after a man was arrested on Monday after engaging in a series of stabbings in the downtown area of Jingan.