BackgroundHealth risk behaviors (HRBs) is a kind of phenomenon behavior that often occurs in adolescence, and also often appears in clusters. Previous studies suggested an association between social ecological risk factors (SERFs) and HRBs. This study explored 1) whether chronotype moderates the risk of HRBs associated with SERFs and 2) whether mental health is a mediator in this relationship.MethodsAdolescents were recruited from 39 junior or senior schools (three cities, 13 schools per city) using a multistage cluster sampling method conducted between October, 2020 and June, 2021. The Social Ecological System, Morningness–Eveningness Questionnaire, Brief Instrument on Psychological Health Youths, and Youth Risk Behavior Surveillance questionnaires were used to measure the SERFs, chronotype, mental health and HRBs. Latent category analysis was used to explore the clustering mode of HRBs. The primary exposure was SERFs, and the primary outcome was HRBs; chronotype was a moderator, and mental health was a mediator. The multivariable logistic regression model was used to determine the relationship between SERFs and chronotype and mental behavioral health status. Mediation moderate analysis using the PROCESS method was used to explore the relationship between these variables. Sensitivity analysis was conducted to evaluate the robustness of the model.ResultsIn total, 17,800 individuals were initially enrolled. After excluding 947 individuals with invalid questionnaires, 16,853 participants were finally included in the analysis. The mean age of participants was 15.33 ± 1.08 years. After adjusting for covariates, multivariable logistic regression found that high levels of SERFs (odds ratio [OR] = 10.10, 95% confidence interval [CI]: 8.88–11.43,P< 0.01), intermediate chronotype (OR = 5.24, 95% CI: 4.57–6.01,P< 0.01), and eveningness (OR = 1.83, 95% CI: 1.64–2.05,P< 0.01) were associated with higher HRBs frequency. This study also assessed the interaction between chronotype, SERFs and HRBs (OR = 27.84, 95% CI: 22.03–35.19,P< 0.01) and mental health (OR = 18.46, 95% CI: 13.16–25.88,P< 0.01). The moderated mediation analyses examined the relationship between chronotype, SERFs, mental health and HRBs.ConclusionsSERFs may be important variables in measuring the effect of the adolescent psychosocial environment on HRBs; this effect is mediated by mental health and moderated by chronotype.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12888-023-04879-6.