Artificial Intelligence (AI) is increasingly used in online education platforms to provide valuable insights into students’ performance and success. However, the complexity of AI models makes it challenging for educators to interpret the specific factors that influence whether a student is going to pass or fail. Utilizing the Open University Learning Analytics Dataset (OULAD), this study employs various machine learning and deep learning techniques for predicting students’ success, along with SHapley Additive exPlanations (SHAP) as an Explainable Artificial Intelligence (XAI) technique, to understand the key factors behind success or failure. Unlike traditional statistical methods that explore variable relationships, this AI-driven approach uses advanced deep learning techniques to identify patterns and insights, allowing for a better understanding of the factors influencing student success. Additionally, this study focuses on identifying students at risk of failure using XAI techniques, specifically SHAP, to interpret model outputs by breaking down how specific factors contribute to a student’s success. This method enables targeted interventions to support their success. Results reveal that student engagement and registration timelines are critical factors affecting performance. The customized models achieve up to 94% accuracy for the designed tasks, outperforming traditional approaches. This study contributes to the use of AI in education and offers practical insights not only for educators but also for administrators and policymakers to enhance the quality and effectiveness of online learning.