This study investigated the impact of inquiry-based learning (IBL) on scientific literacy (SL) among Ghanaian senior high school students, with learner engagement (LE) serving as a mediator and gender and socioeconomic status (SES) acting as moderators. A cross-sectional survey was conducted using multistage sampling to select 400 senior high school students. Bootstrapped mediation analysis and Ordinary Least Squares regression were utilised for data analysis. The findings indicated that IBL significantly predicted learner engagement (β = 0.47, p < .001) and scientific literacy (β = 0.31, p < .001): For every 1 standard deviation increase in IBL, learner engagement increases by 0.47 standard deviations, while scientific literacy increases by 0.31 standard deviations, holding other variables constant. Furthermore, learner engagement was found to be a strong predictor of scientific literacy (β = 0.42, p < .001), indicating a moderate-to-strong effect, whereby every 1 standard deviation increase in learner engagement corresponds to an increase of 0.42 standard deviations in scientific literacy, controlling for other variables. Additionally, the mediation pathway (IBL → LE → SL) was significant, providing partial mediation with a substantial effect size (β = 0.20, 95% CI [0.11, 0.32]). Lastly, separate moderation analyses revealed significant effects across subgroups. The gender association was stronger for females (B = 0.49, p < .001) compared to males (B = 0.34, p < .001), while socioeconomic status was more pronounced among high-SES students (B = 0.58, p < .001) than low-SES students (B = 0.37, p < .001).