AIMS: While the cross-sectional relationship between internet gaming disorder (IGD) and depression is well-established, whether IGD predicts future depression remains debated, and the underlying mechanisms are not fully understood. This large-scale, three-wave longitudinal study aimed to clarify the predictive role of IGD in depression and explore the mediating effects of resilience and sleep distress. METHODS: A cohort of 41,215 middle school students from Zigong City was assessed at three time points: November 2021 (T1), November 2022 (T2) and November 2023 (T3). IGD, depression, sleep distress and resilience were measured using standardized questionnaires. Multiple logistic regression was used to examine the associations between baseline IGD and both concurrent and subsequent depression. Mediation analyses were conducted with T1 IGD as the predictor, T2 sleep distress and resilience as serial mediators and T3 depression as the outcome. To test the robustness of the findings, a series of sensitivity analyses were performed. Additionally, sex differences in the mediation pathways were explored. RESULTS: (1) IGD was independently associated with depression at baseline (T1: adjusted odds ratio [AOR] = 4.76, 95% confidence interval [CI]: 3.79-5.98, CONCLUSIONS: IGD is a significant predictor of depression in adolescents, with resilience and sleep distress serving as key mediators. Early identification and targeted interventions for IGD may help prevent depression. Intervention strategies should prioritize enhancing resilience and improving sleep quality, particularly among boys at risk.