The rapid expansion of online learning necessitates advanced methods for proactively identifying student disengagement. This study evaluated machine learning (ML) models to predict student engagement levels using behavioral indicators extracted from learning management systems within Pakistani higher education. Behavioral data from 200 students, including login frequency, time-on-task, and assignment submission timeliness, were analyzed. Results indicated that ensemble methods, particularly Random Forest, achieved the highest predictive accuracy (86.5%). Correlation and feature importance analyses identified assignment submission timeliness as the strongest predictor of engagement. The study integrated explainable AI (XAI) techniques to ensure model transparency and inform pedagogical action. Findings demonstrate the viability of using interpretable ML models for early identification of at-risk students in online environments, especially in developing country contexts. The discussion emphasizes the need for responsible implementation, ethical governance, and professional development to translate predictive insights into supportive interventions that enhance equity and learning outcomes.