Purpose: Young men who have sex with men (YMSM) are likely to experience depression due to enacted and internalized stigma. Whether enacted stigma impacts depression through internalized stigma and whether resilience moderates the negative effect are unclear. This study aims to examine a moderated mediation model to explore the role of internalized stigma in mediating the relationship between enacted stigma and depressive symptoms and whether this relationship is modified by resilience among Chinese YMSM. Methods: Between September 2017 and January 2018, we conducted a baseline survey of a four-year cohort study among men who have sex with men in China. An anonymous computer-assisted ("Questionnaire Star") self-interview questionnaire survey was conducted, and 346 YMSM were included for analysis. Sociodemographic characteristics, enacted stigma, internalized stigma, resilience, and depressive symptoms were measured. Mediation and moderated mediation model analysis were used to examine the relationships among these variables. Results: Overall, 38.7% (137) participants reported depressive symptoms. Internalized stigma partly mediated the relationship between enacted stigma and depressive symptoms (beta = 0.091, P<.01). Moderation mediation analysis found positive moderating role of resilience in the relationship between enacted stigma and internalized stigma (beta = -0.026, P = .019), as well as between enacted stigma and depressive symptoms (beta = -0.053, P = .008). The indirect effects of enacted stigma on depressive symptom through internalized stigma were significant only when resilience was at low (b = 0.191, 95% CI = 0.072,0.366) and moderate (b = 0.104, 95% CI = 0.035,0.220) levels but not significant when resilience was high (beta = 0.017, 95% CI = -0.083, 0.140). Conclusions: Enacted stigma could directly impact depressive symptoms, and internalized stigma partly mediated the relationship between enacted stigma and depressive symptoms. Resilience significantly moderated the association between enacted stigma and depressive symptoms as well as the association between enacted stigma and internalized stigma. Promoting resilience while reducing enacted stigma and internalized stigma may be useful in relieving depressive symptoms among Chinese YMSM. (C) 2021 Elsevier Inc. All rights reserved.