BackgroundTo summarize the general status of nonsuicidal self-injury (NSSI) behaviour and the characteristics of junior high school students and to determine the risk factors associated with NSSI behaviour.MethodsFive middle schools in the rural and urban areas of Hainan Province were randomly selected for this cross-sectional study, and junior high school students were administered questionnaires, including the General Sociodemographic Questionnaire, Ottawa Self-Injury Scale, Anxiety Self-Rating Scale, Depression Self-Rating Scale, Adolescent Lifestyle Scale, and Parenting Style Scale.ResultsThe NSSI rate among junior high school students in Hainan Province was 28.9%, with a higher prevalence among girls than boys (P < 0.05). The age range was 11–16 years, with a mean age of 13.08 ± 0.911 years. The most common form of self-injury was scratching/bruising, followed by hitting oneself, pulling out hair, biting, head banging, and cutting. The NSSI methods of scratching/bruising, hitting oneself and cutting more commonly occurred in girls than boys (P < 0.05). The most common sites of self-injury were the face, scalp, lips, forearm/elbow, axilla/wrist, hands/fingers, and thighs/knees. Significant differences were observed in the distribution of self-injury sites (nose, lips, genitals, and axillae/wrists) between the two genders (p< 0.05). The most important motivation for undertaking NSSI behaviours was to release negative emotions. The risk factors affecting NSSI behaviours were female gender (OR = 1.793), depression (OR = 1.961), anxiety (OR = 1.495), interpersonal relationship factors (OR = 1.099), academic stress factors (OR = 1.062), maternal emotional warmth (OR = 0.97), and maternal overinterference (OR = 1.036).ConclusionsThe NSSI rate among junior high school students in Hainan was 28.9%, affecting girls more than boys. The form and site of self-injury between boys and girls were significantly different. The motivation for committing self-injurious behaviours was mainly to regulate bad emotions. Risk factors for NSSI behaviours included female gender, anxiety, depression, interpersonal relationship factors, academic stress factors, and maternal emotional overinterference, while maternal emotional warmth was a protective factor.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40359-023-01227-x.