ObjectivesThis study explores whether feelings of defeat (i.e., a sense of failed struggle and losing rank; referred to as defeat for simplicity) mediated the effect of work stress on depression/anxiety, the effect of interpersonal needs on depression/anxiety for Chinese industrial workers, and the possible moderating role of social support.MethodA cross-sectional study was conducted in Shenzhen, China in 2019, in total, 2023 industrial workers (of 2700 invited; response rate = 75%) completed a self-administered survey consisted of Job Stress Scale, Interpersonal Needs Questionnaire, Defeat Scale, Centre for Epidemiological Studies Depression Scale, Generalized Anxiety Disorder Scale, two face-valid questions for social support, as well as sociodemographic information. Moderated mediation model was tested and loop plots were applied to probe into the conditional effects of work and interpersonal stress on depression and anxiety symptoms.ResultBoth the direct and indirect effect of work stress on depression and anxiety through defeat were significant (Work stress→ Depression:B= 0.035,p< .001, Work stress→ Defeat→ Depression:B= 0.034,p< .001; Work stress→ Anxiety:B= 0.038,p< .001, Work stress→ Defeat→ Anxiety:B= 0.045,p< .001). Meanwhile, defeat mediated the relationship of interpersonal needs with depression partially and the relationship of interpersonal needs with anxiety totally (Interpersonal needs→ Anxiety: B = 0.133, p < .001, Interpersonal needs→ Defeat→ Anxiety:B= 0.010,p= .537). Social support moderated the indirect path between interpersonal needs and depression/anxiety and buffered the effect.ConclusionThe mediating role of defeat and the moderator role of social support in the relationship between stress and depression/anxiety were confirmed in industrial workers. Workers who reported more work and interpersonal stress would report more defeat feelings, and then exhibited more depression and anxiety symptoms; this mediation effect was stronger for those who had lower social support, respectively.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12889-023-16002-1.