Background Effects of parental marital status on nonsuicidal self-injury (NSSI) behaviors and negative emotions in adolescents have been rarely reported, and the existing research sample size is relatively small. Objective To explore the association of parental marital status with negative emotions and NSSI in middle school students, to provide a reference for the prevention and control of NSSI in them. Methods A stratified random sampling method was used to conduct the questionnaire survey on students from 20 townships and 67 middle schools in Nanchong City and its surrounding areas from March to April 2020. The investigators input the questionnaire into the WJX.cn to generate QR codes, which were distributed to parents or student guardians by schools. The questionnaire, consisting of the General Information Questionnaire, Ottawa Self-injury Inventory (OSI) and the Chinese version of the Depression Anxiety Stress Scale-21 (DASS-21), was used to calculate the detection rates of NSSI, depression, anxiety and stress in middle school students to analyze the relevant factors affecting NSSI, depression, anxiety and stress in middle school students. Results A total of 8 785 students from 23 middle schools were surveyed, and 8 606 valid questionnaires were finally obtained, with a valid recovery rate of 98.0%. Among the 8 606 middle school students, there were 4 540 (52.8%) males, 4 066 (47.2%) females; 5 937 (69.0%) junior high school students, 1 028 (11.9%) senior high school students and 1 641 (19.1%) vocational high school students; 7 274 (84.5%) students in two-parent families, 787 (9.1%) students in divorced single-parent families, and 545 (6.4%) students in families with divorced and remarried parents. The detection rates of NSSI, depression, anxiety and stress in middle school students were 5.6% (486/8 606), 21.9% (1 884/8 606), 26.8% (2 305/8 606) and 12.3% (1 060/8 606), respectively. The results of multivariate Logistic regression analysis showed that among all middle school students, compared with boys, girls had a higher risk of NSSI (OR=2.363, 95%CI=1.946-2.868) and anxiety (OR=1.195, 95%CI=1.086-1.315) ; compared with junior high school students, vocational high school students had a higher risk of NSSI (OR=1.847, 95%CI=1.494-2.284), depression (OR=1.886, 95%CI=1.667-2.134), anxiety (OR=1.857, 95%CI=1.141-1.532) and stress (OR=1.527, 95%CI=1.309-1.781) ; compared with middle school students in two-parent family, students in divorced single-parent family had a higher risk of NSSI (OR=2.194, 95%CI=1.669-2.834), depression (OR=1.563, 95%CI=1.326-1.843), anxiety (OR=1.573, 95%CI=1.346-1.839) and stress (OR=1.417, 95%CI=1.153-1.741), students in families with divorced and remarried parents also had a higher risk of NSSI (OR=2.207, 95%CI=1.638-2.975), depression (OR=1.863, 95%CI=1.543-2.249), anxiety (OR=1.796, 95%CI=1.499-2.153) and stress (OR=1.821, 95%CI=1.453-2.282) ; compared to middle school students who are taken care of by their parents for a long time, those who are taken care of by their father alone, mother alone or grandparents alone for a long time had a higher risk of NSSI, depression and anxiety (by father alone: OR=2.045, 95%CI=1.366-3.062; OR=1.633, 95%CI=1.289-2.145; OR=1.373, 95%CI=1.069-1.762; by mother alone: OR=1.772, 95%CI=1.141-2.751; OR=1.435, 95%CI=1.095-1.882; OR=1.513, 95%CI=1.174-1.951; by grandparents alone: OR=2.465, 95%CI=1.918-3.168; OR=1.783, 95%CI=1.513-2.100; OR=1.843, 95%CI=1.577-2.154), students who were taken care of by mother alone or by grandparents alone had a higher risk of stress (OR=1.604, 95%CI=1.166-2.207; OR=1.678, 95%CI=1.375-2.049) (P