The quality of education in public elementary schools in Serang Regency is influenced by several factors, including principals' leadership quality, teacher competence, and teachers' work motivation. Improving educational quality requires effective leadership, competent teachers, and strong work motivation to ensure optimal learning outcomes. This study aimed to analyze the effects of principals' leadership quality and teacher competence on educational quality through teachers' work motivation in public elementary schools in Serang Regency, both directly and indirectly. This study employed a quantitative survey approach. Data were collected through questionnaires distributed to public elementary school teachers and analyzed using Structural Equation Modeling–Partial Least Squares (SEM-PLS) with SmartPLS software. The findings revealed that teacher competence had a positive and significant effect on work motivation and educational quality. Leadership quality had a positive and significant effect on work motivation but showed a significant negative direct effect on educational quality. Work motivation had a positive and significant effect on educational quality and significantly mediated the effects of teacher competence and leadership quality on educational quality. The model explained 56.3% of the variance in work motivation and 64.6% of the variance in educational quality. In conclusion, improving educational quality is more effective through strengthening teacher competence and leadership quality that enhances teachers' work motivation. Work motivation is the key factor in improving the quality of education in public elementary schools in Serang Regency.