Research has shown a connection between bullying victimization and substance use, but the underlying mechanisms of these links remain unclear. Using data from the 2021 Youth Risk Behavior Surveillance System of 9th-12th grade students (n = 16,410), we employed a generalized structural equation modeling approach to investigate the relationships between bullying, cyberbullying, sex, and the use of e-cigarettes, alcohol, and binge drinking. We considered sadness or hopelessness, aggression, mental health issues, and skipping school as potential mediators. Our results revealed a consistent relationship between both cyberbullying and traditional bullying with the use of e-cigarettes, alcohol, and binge drinking. This relationship was mediated by sadness, hopelessness, and aggression. Interestingly, we found that males were more likely than females to use e-cigarettes, alcohol, and engage in binge drinking, with aggression as the mediator. Conversely, females were more likely than males to use these substances, with sadness or hopelessness as a mediator.