Morocco faces a critical challenge with its student dropout rates. While dropout rate stands at 3.6% in primary school, is escalates to 14.3% in middle-school, and 10.4% in high school as of 2019. Precise identification of students vulnerable to academic discontinuation offers an opportunity for proactive remedial intervention, enabling schools to orchestrate timely preventive measures. This study focuses on utilizing data mining and machine learning techniques to predict academic dropouts and facilitate timely intervention in middle school and high school. By leveraging a comprehensive dataset encompassing academic, demographic, and socio-economic information for 336,135 students in the region of Fes-Meknes in 2015-2019, the research aims to achieve two primary objectives: (1) modeling machine learning algorithms to forecast student dropout, aiding in early detection and intervention for at-risk students, and (2) identifying key data features that encapsulate the risk factors leading to dropout, aiding in early detection and intervention for at-risk students. Through a comparative analysis of different machine learning methodologies, the study reveals promising results, demonstrating the ability to correctly identify 84% of potential dropouts by filtering just 19% of the dataset using Gradient Boosted Trees. The research identifies unauthorized absences, Grade Point Average (GPA), and class rank as crucial indicators for predicting school dropout. These findings offer valuable insights and pave the way for implementing predictive data science in the education sector, potentially mitigating dropout rates and promoting academic success in Morocco.