This study focuses on the decline in math scores among fourth-grade students in Saudi Arabia, which is a significant concern. The Saudi Arabian Ministry of Education is taking steps to improve education and provide students with the necessary skills for their future careers. Understanding what affects student achievement is key to solving this problem. Motivation in education is a critical factor that influences students' attitudes and their success in school. This research looks at how academic motivation affects educational success through a process called mediation analysis. It considers how self-concept and values, which come from motivation, play a role. The study uses the expectancy-value theory of achievement motivation to create a model that explores how motivation and other factors like school bullying, feeling connected to school, and perceptions of teachers interact and affect each other. Mediation analysis helps examine the direct and indirect effects these factors have on student achievement. Data from the trends in international mathematics and science study (TIMSS) for fourth graders in Saudi Arabia is used to see if the theory fits with the experiences of Saudi students. The findings show that self-confidence is crucial for academic performance, affecting students' motivation, readiness to face challenges, and overall learning attitude. However, math attitude does not directly influence self-concept. School bullying is identified as a significant negative factor in math achievement. These outcomes stress the need to address school bullying to improve math scores and highlight the importance of self-concept and motivation in boosting academic success.