The advancement of digital technology has transformed instructional practices in elementary schools; however, improvements in student motivation and engagement remain inconsistent, as prior studies have largely examined these relationships in isolation without addressing underlying psychological mechanisms. This study investigates the influence of teachers’ teaching styles on learning motivation and student engagement, with student digital media self-efficacy as a mediating variable. Using a quantitative survey of 313 elementary school teachers selected through quota sampling, data were collected via questionnaires and analysed using Partial Least Squares–Structural Equation Modelling (PLS-SEM), with student-related variables assessed through teachers’ perceptions. The findings reveal that teaching styles significantly influence digital self-efficacy (β = 0.598; p < 0.001) and learning motivation (β = 0.359; p < 0.001). Digital self-efficacy significantly affects student engagement (β = 0.596; p < 0.001) and learning motivation (β = 0.406; p < 0.001), while learning motivation also contributes to student engagement (β = 0.186; p = 0.008). These results confirm that digital self-efficacy functions as a central psychological mechanism linking pedagogical practices to student engagement. This study contributes theoretically by advancing a comprehensive mediation model that integrates pedagogical and psychological dimensions in digital learning, and practically by highlighting the need for adaptive, technology-integrated teaching strategies to strengthen students’ digital self-efficacy and sustain their motivation and engagement.