Links between schools' demographic composition and students' achievement have been a major policy interest for decades. Using a racially/ethnically diverse sample from the National Longitudinal Study of Adolescent Health (N = 6,302; 54% females; 53% White, 21% African American, 15% Latino, 8% Asian American, 2% other race/ethnicity), we examined the associations between demographic marginalization, students' later social integration (loneliness at school, school attachment), and educational performance and attainment. Adolescents who were socioeconomically marginalized at school [i.e., having <15% same-socioeconomic status (SES) peers] had lower cumulative grade point averages across high school and lower educational attainment. A similar disadvantage was observed among students who were both socioeconomically and racially/ethnically marginalized at school (i.e., having <15% same-SES peers and <15% same-racial/ethnic peers). Indirect effects were also observed, such that demographic marginalization was linked to poorer school attachment, and poorer school attachment, in turn, was related to poorer academic performance. These results highlight the educational barriers associated with demographic marginalization and suggest potential targets for future intervention efforts.