BackgroundSocial media use is ubiquitous among lesbian, gay, bisexual, and transgender or nonbinary (LGBT) adolescents. The time spent on LGBT sites and involvement in social justice–oriented web-based civic activities can increase exposure to heterosexist and transphobic posts, resulting in increases in depression, anxiety, and substance use. Collaborative social justice civic engagement may also increase LGBT adolescents’ social support on the web, which may buffer the mental health and substance use risks associated with web-based discrimination.ObjectiveDrawing on the minority stress and stress-buffering hypotheses, this study aimed to test time spent on LGBT sites, involvement in web-based social justice activities, the mediating effect of web-based discrimination, and the moderating effect of web-based social support on mental health and substance use.MethodsAn anonymous web-based survey conducted from October 20 to November 18, 2022, analyzed data from 571 respondents (mean age 16.4, SD 1.1 years): 125 cisgender lesbian girls, 186 cisgender gay boys, 111 cisgender bisexual adolescents, and 149 transgender or nonbinary adolescents. Measures included demographics, web-based LGBT identity disclosure, hours per week spent on LGBT social media sites, engagement in web-based social justice activities (Online Civic Engagement Behavior Construct), exposure to web-based discrimination (Online Victimization Scale), web-based social support (adapted from scales examining web-based interactions), depressive and anxiety symptoms, and substance use (the Patient Health Questionnaire modified for Adolescents; Generalized Anxiety Disorder 7-item; and Car, Relax, Alone, Forget, Friends, Trouble Screening Test).ResultsThe time spent on LGBT social media sites was unrelated to web-based discrimination after civic engagement was accounted for (90% CI −0.007 to 0.004). Web-based social justice civic engagement was positively associated with social support (β=.4, 90% CI 0.2-0.4), exposure to discrimination (β=.6, 90% CI 0.5-0.7), and higher substance use risk (β=.2, 90% CI 0.2-0.6). Consistent with minority stress theory, exposure to web-based discrimination fully mediated the positive association between LGBT justice civic engagement and depressive (β=.3, 90% CI 0.2-0.4) and anxiety symptoms (β=.3, 90% CI 0.2-0.4). Web-based social support did not moderate the association between exposure to discrimination with depressive (90% CI −0.07 to 0.1) and anxiety symptoms (90% CI −0.06 to 0.1) and substance use (90% CI −0.04 to 0.01).ConclusionsThis study highlights the importance of examining LGBT youth’s specific web-based activities and the need for future research to focus on the intersectional experiences of LGBT adolescents from racial and ethnic minoritized groups through culturally sensitive questions. This study also calls for social media platforms to implement policies that mitigate the effects of algorithms that expose youth to heterosexist and transphobic messaging, such as adopting machine learning algorithms that can efficiently recognize and remove harmful content.