BackgroundWorkplace violence against medical staff in China is a widespread problem that has negative impacts on medical service delivery. The study aimed to contribute to the prevention of workplace violence against medical staff in China by identifying patterns of workplace violence, key risk factors, and the interplay of risk factors that result in workplace violence.MethodsNinety-seven publicly reported Chinese healthcare violent incidents from late 2013 to 2017 were retrospectively collected from the internet and analysed using content analysis. A modified socio-ecological model guided analysis of the violent incidents focusing on risk.ResultsPhysical violence, yinao, or a combination of physical and verbal violence were the typical forms of violence reported. The findings identified risk at all levels. Individual level risk factors included service users’ unreasonable expectations, limited health literacy, mistrust towards medical staff, and inadequacy of medical staff’s communication during the medical encounter. Organisational level risk factors under the purview of hospital management included problems with job design and service provision system, inadequacies with environmental design, security measures, and violence response mechanisms within hospitals. Societal level risk factors included lack of established medical dispute-handling mechanisms, problems in legislation, lack of trust and basic health literacy among service users. Situational level risks were contingent on risk factors on the other levels: individual, organisational, and societal.ConclusionsInterventions at individual, situational, organisational, and societal levels are needed to systematically address workplace violence against medical staff in China. Specifically, improving health literacy can empower patients, increase trust in medical staff and lead to more positive user experiences. Organizational-level interventions include improving human resource management and service delivery systems, as well as providing training on de-escalation and violence response for medical staff. Addressing risks at the societal level through legislative changes and health reforms is also necessary to ensure medical staff safety and improve medical care in China.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12913-023-09577-3.