Students who experience bullying at school present different negative outcomes, including lower academic achievement. However, the process by which bullying is connected to academic achievement is not clear. Using the Trends in International Mathematics and Science Study (TIMSS) dataset from Chilean schools in 2011, we sought to estimate the indirect effects of bullying on mathematics achievement via two key socio-motivational factors, namely school belonging and students’ engagement. Results of our multilevel latent covariate analyses showed that schools’ bullying rates were predictive of school differences in mathematics achievement, but these effects were explained by broader characteristics of the school environment such as perceived levels of safety and discipline. Crucially, the hypothesized indirect pathway was evident at the within-school level, showing that individual experiences of bullying are related to a poorer sense of belonging with the school as a whole, as well as poorer classroom engagement.