Family socioeconomic status influences pupils' academic achievements, and studies have established positive associations between physical fitness and academic achievements. However, whether physical fitness mediates the relationship remains unknown. We investigated if pupils' physical fitness mediates the pathway between family socioeconomic status and academic achievement using causal inference-based mediation analysis. This study included 527 girls and 552 boys between 13 and 15years of age from the Danish municipality of Aalborg. Physical fitness was measured through VO2max tests in 2010 and demographic data were obtained from nationwide registers. Family socioeconomic status was classified into four levels ranging from 1 to 4, where level 1 represents the lowest and level 4 the highest based on either family income or education. Controlling for sex, ethnicity, age, and parents' cohabitation status, all total effects display higher academic achievement with increased family socioeconomic status. Splitting the effects, the direct effects reveal the existence of other pathways not involving physical fitness. The indirect effects established physical fitness as a mediator showing that pupils from family socioeconomic status levels one, three, and four changes grade by - 0.13 [95% confidence interval (CI) - 0.26, - 0.01], 0.07 (95% CI 0.00, 0.14), and 0.24 (95% CI 0.14, 0.34), respectively, compared to socioeconomic status level two. The corresponding proportions mediated are 18% (95% CI 1, 57), 6% (95 CI 0, 13), and 12% (95% CI 7, 18) when family socioeconomic status is based on education. Classifying family socioeconomic status on income, pupils from family socioeconomic status levels one, three, and four show grade changes of - 0.07 (95% CI - 0.16, 0.02), 0.22 (95% CI 0.13, 0.32), and 0.26 (95% CI 0.15, 0.37), respectively, compared to socioeconomic status level two. The corresponding proportions mediated are 12% (95% CI - 6, 41), 30% (95% CI 16, 54), and 20% (95% CI 12, 32). In conclusion, pupils' physical fitness partially mediated the pathway between family socioeconomic status and academic achievement.