The importance of studying suicidal behavior cannot be overstated given the concerning prevalence. Despite a wide range of studies on suicidal behaviors, three major limitations remain. First, most studies are cross-sectional. Second, most studies examined risk factors of suicidal ideation in isolation. A meta-analysis covering the past 50 years of suicidal research found that prediction was only slightly better than chance because researchers rarely tested the combined effect of multiple risk factors. Researchers recommended utilizing machine learning (ML) approaches to study suicidal ideation instead because ML can address complex classification problems. Third, many studies have ignored the possibility that suicidal ideation can shift throughout different developmental stages. Disregarding the fact that there are different trajectories of suicidal ideation can lead to biased results. In this paper, I addressed the limitations of past research by first investigating different trajectories of suicidal ideation using Latent Class Growth Analysis on a large, nationally representative longitudinal dataset (n = 7,295). I then used two ML approaches, classification trees and random forests, to examine which risk factors are predictive of the identified trajectories. Two hundred and eighty-one predictors were included in the ML models, spanning demographic, psychological, behavioral, economic, social, and environmental variables linked to suicidal behaviors, such as mental health, violence exposure, family, peer, and school functioning, neighborhood characteristics, community engagement, negative life events, expectations for the future, risky behaviors, self-esteem, and substance use. The Latent Class Growth Analysis identified three distinct trajectories: (a) Resilient Class, (b) Declining Class, and (c) Escalating Class. When comparing the predictive performance, machine learning models, specifically classification tree (AUC = 0.73) and random forest (AUC = 0.79), outperformed the traditional multinomial logistic regression (AUC = 0.64). Variable importance analysis from the random forest model revealed prior suicidal behaviors, psychological distress, and school belonging to be one of the most important predictors across all three classes. The findings of this study provide insight into the utility of these advanced computational approaches for predicting suicidal outcomes and inform future intervention efforts to support those struggling with suicidal ideation. Limitations and future directions are discussed.