Non-suicidal self-injury (NSSI) is becoming increasingly prevalent and harmful among adolescents, yet its intrinsic mechanism and early identification remain to be further explored. To investigate the influencing factors of NSSI in junior high school students and develop an early identification tool, a questionnaire survey was conducted on 1160 junior high school students in Shandong Province (49.9% female; mean age = 14.05 years, SD = 0.833). This study examined the mechanism of action of parental psychological control, future self-continuity and cognitive reappraisal on NSSI, and based on the above analysis, a machine learning-based NSSI risk prediction model (NSSI-XGBoost) was constructed using eXtreme Gradient Boosting (XGBoost). The results showed that the Prevalence of NSSI was 52.50%; future self-continuity played a partial mediation effect between paternal guilt induction, maternal love withdrawal and NSSI; cognitive reappraisal moderated the direct path of paternal love withdrawal, paternal authoritarianism, maternal love withdrawal to NSSI, as well as the indirect path of paternal guilt induction, maternal love withdrawal to NSSI via future self-continuity. The NSSI-XGBoost model exhibited good discriminative performance (AUC = 0.816 in the test set), with the main predictive variables being cognitive reappraisal, maternal love withdrawal and paternal guilt induction. This study revealed the key roles of future self-continuity and cognitive reappraisal in the relationship between parental psychological control and NSSI, and constructed a prediction model with high accuracy, providing a practical tool for the early identification of NSSI in junior high school students.