ObjectiveNon-suicidal self-injury (NSSI) has become a common clinical problem that severely threatens the mental and physical health of Chinese adolescents. This study explores the mediation effects of NSSI functions on the relationship between anxiety and NSSI frequency among depressed Chinese adolescents as well as the sex differences in the mediating effects.MethodsIn this study, a cross-sectional survey method was used to obtain data of 1773 adolescent patients with major depressive disorders from over 20 specialized psychiatric hospitals across multiple provinces in China. A self-designed questionnaire for demographic information, the Chinese version of Functional Assessment of Self- Mutilation (C-FASM), and the 7-item Generalized Anxiety Disorder Scale (GAD-7) were employed to investigate demographic data, NSSI frequency, NSSI functions, and anxiety and to analyze the mediating effects of NSSI functions on the association between anxiety and NSSI frequency among adolescents of different sexes.ResultsA total of 316 male patients and 1457 female patients were investigated. Female patients had a higher NSSI frequency (Z=3.195, P=0.001) and higher anxiety scores than did male patients (Z=2.714, P=0.007). Anxiety had a stronger positive predictive effect on the NSSI frequency in females (OR = 1.090) than in males (OR = 1.064). For male patients, the emotion regulation function in NSSI motivation played a full mediating role in the association between anxiety and NSSI frequency. For female patients, the emotion regulation and social avoidance functions in NSSI functions played a partial mediating role between anxiety and NSSI frequency.ConclusionsThere are sex differences in the mediating role of NSSI functions of depressed adolescents in the association between anxiety and NSSI frequency. When experiencing anxiety, both males and females may engage in NSSI behaviors as a means to regulate their emotions. For females, anxiety can directly predict NSSI frequency, and they may attempt NSSI to achieve the purpose of rejecting others. In the face of anxiety among depressed adolescents of different sexes, developing different emotional regulation methods and behavioral regulation strategies may be critical in preventing their NSSI behaviors.