The academic performances of secondary school students were analysed and predicted in this study using machine learning (ML). Using data from secondary schools in the Ise/Orun Local Government Area of Ekiti State, Nigeria, the study aimed to address learning gaps and low engagement among students. A high percentage of students in secondary schools usually struggle with a lack of motivation, unequal learning opportunities, and poor reading habits, even though education is key to personal and social development. This study was designed to solve these problems. Primary data, like class attendance, assignment and examination scores, social media engagement, hours of sleep, and levels of education of students’ parents, were used for this study. Random Forest, Decision Tree, and XGBoost were the supervised machine learning techniques adopted for the analysis to gain meaningful insights from the data. Streamlit was used to build a user-friendly and interactive web application. The application allowed teachers, students, and school administrators to enter data and receive predictions about students’ academic performance immediately. The findings show impressive accuracy of around 75% for XGBoost, with precision, recall, and F1-score of 75%, 76%, and 76%, respectively. This shows a great possibility for identifying students who may drop out, allowing educators to intervene in time. Metrics such as precision, recall, and F1-score, in addition to accuracy, were used to provide a more comprehensive evaluation of performance. The model uses both binary classifications to predict which student is likely to be disengaged and a multi-class classification to detect students’ level/categories of performance: Pass (A-C) and Fail (D-F). These two techniques not only allow for the quick identification of disengaged learners but also provide a more in-depth look for further instructional intervention when necessary. It is therefore recommended that this predictive tool be incorporated into school programmes, in compliance with ethical rules for data privacy. Also, further research should be undertaken to improve accuracy and expand the use of machine learning in educational institutions like primary and tertiary schools.