Suicide has emerged as a major societal issue. Studies indicate that Chinese higher vocational students experience higher levels of suicidal ideation (SI) compared with the general population. This study aims to explore the feasibility of using machine learning (ML) to identify SI and to determine the most suitable model. This cross-sectional study was conducted at an engineering university, predominantly attended by male students. First, we compared demographic and clinical characteristics between participants with and without SI. We then applied 10 ML models to identify the presence of SI. The study included 1,408 (89.51%) male and 165 (10.49%) female students. The prevalence of SI was 20.34% (320/1573). Individuals with SI were more likely to be female, spend more time playing computer games, have poor academic scores, have poor relationships with teachers and schoolmates, experience more severe mental distress, have more serious childhood trauma, and have histories of non-suicidal self-injury (NSSI)-related acts or thoughts (all P <
.001). Most ML models showed excellent performance, particularly the random forest model, which achieved an ROC AUC of 0.97, a specificity of 96.00%, and a sensitivity of 90.63%. Consistent attention should be given to Chinese higher vocational students with NSSI ideas, bipolar disorder symptoms, and depression symptoms. ML can be used effectively in clinical practice to recognise higher vocational students who exhibit SI.