To explore the moderating effect of sense of coherence in the relationship between occupational stress and depression. From June to September in 2018, migrant workers were purposively selected from the urban (including office buildings, shopping malls, barber shops or restaurants and other service enterprises) and suburban (including microelectronics, internet, clothing processing and art design and other factories) areas of Shanghai. A total of 3 034 people were investigated and 2 573 valid questionnaires were collected. Patient health questionnaire (PHQ), sense of coherence questionnaire (SOC) and job content questionnaire (JCQ) were used to investigate the levels depression, sense of coherence and occupational stress. Hierarchical regression analysis was used to analyze the moderating effect of sense of coherence on occupational stress and depression, and SPSS PROCESS macro program and Bootstrap method were used to further explore the moderating effect of sense of coherence. The age of total 2 573 migrant workers was (28.24±7.33) years old and 49.79% of them were males. The scores of depression, occupational stress and sense of coherence were 6.67±4.74, 28.45±4.38 and 62.02±10.89, respectively. The depression level was positively correlated with occupational stress (=0.33, =0.007), and negatively correlated with sense of coherence (=-0.53, =0.003). The hierarchy regression analysis suggested that the interaction between occupational stress and sense of coherence was associated with depression symptom (β=-0.07, =0.001). Bootstrap analysis showed that occupational stress was not associated with depression symptom with high level of sense of sense of coherence (β=0.04, 95%=-0.01-0.10), while occupational stress was associated with depression symptom with low level of sense of sense of coherence (β=0.19, 95%=0.14-0.23). The high level of sense of coherence has a moderating effect on the relationship between occupational stress and depressive symptoms, while the low level of sense of coherence does not have this effect.