BackgroundAlthough workplace bullying is common among medical workers, its associations with insomnia severity and subjective wellbeing are still unclear. Our study aimed to investigate these associations among resident doctors who are more vulnerable to both workplace bullying and insomnia.MethodsWe conducted a cross-sectional survey of 1,877 resident doctors from 12 hospitals across 7 administrative regions in China. Workplace bullying, resilience, insomnia severity, and subjective wellbeing were evaluated by the Negative Acts Questionnaire-Revised (NAQ-R), the Chinese version of the Connor-Davidson Resilience Scale-10-item (CD-RISC-10), the Insomnia Severity Index, and the Index of Wellbeing, respectively. Further, a logistic regression analysis was used to analyze factors associated with insomnia. In addition, structural equation modeling (SEM) was applied to examine the associations among workplace bullying, resilience, insomnia severity, and subjective wellbeing.ResultsIn the present study, the rates of workplace bullying and insomnia were 51.4 and 33.2%, respectively. Workplace bullying (OR = 1.056, p < 0.001) and poor resilience (OR = 0.957, p < 0.001) were the factors associated with insomnia after controlling the confounding variables. Further, SEM of the present study revealed a direct relationship between workplace bullying and subjective wellbeing (std-β = −0.223, p < 0.001). In addition, insomnia severity (std-β = −0.071, p < 0.001) and resilience (std-β = −0.092, p < 0.001) can individually or collectively (std-β = −0.008, p < 0.001) mediate the indirect associations between workplace bullying and subjective wellbeing. However, resilience was found to act as a moderator only in the direct association between workplace bullying and subjective wellbeing.ConclusionsWorkplace bullying and poor resilience were the factors associated with insomnia. Further, greater resilience acted as a buffer in the direct association between workplace bullying and subjective wellbeing, whereas both insomnia severity and resilience were critical mediators in the indirect associations between them.