The escalating incidence of diabetes in globe has prompted the medical sector to explore innovative approaches aimed at enhancing their medical technologies. Integrating machine learning (ML) algorithms into clinical care can play a pivotal role in early diabetes detection, thus helping to mitigate the potential health complications associated with the condition. Moreover, the latest Explainable Artificial Intelligence (XAI) techniques have the potential to facilitate user understanding and trust in AI-driven decisions. This work proposes a method for the precise detection of diabetes through meticulous data preprocessing, the construction of an ensemble ML algorithm and the interpretation of the model's outcomes using XAI. Early detection of diabetes enables timely intervention through medication, dietary adjustments, and lifestyle modifications, leading to improved blood sugar regulation and reduced risk of diabetes-related complications. The proposed work uses preprocessing techniques like K Nearest Neighbors (KNN) imputation, One-Class Support Vector Machine (OCSVM) anomaly detection, Synthetic Minority Over-Sampling Technique and Edited Nearest Neighbour (SMOTE + ENN) data balancing technique, and ensemble model has KNN, Support Vector Machine (SVM), and eXtreme gradient boosting (XGB) as baseline models and Random Forest (RF) as meta classifier. This research underscores the importance of building a reliable model for diabetes prediction and interpreting the results using the Local Interpretable Model-Agnostic Explanation (LIME) technique. This work addresses challenges such as missing data, anomalies, data imbalance, and appropriate model selection, while highlighting the significance of comprehending the model's outcomes. The proposed ensemble model achieved an accuracy of 97%.