Abstract Public health and ecological systems and safe drinking water supplies face serious dangers from groundwater contamination which particularly affects areas that experience rapid urban growth and industrial development. Groundwater quality assessment methods which scientists have traditionally used depend on laboratory testing and statistical analysis which takes extensive time while generating high costs and fails to produce accurate predictive results. This study introduces HydroNet-X, an innovative explainable ensemble deep learning framework which provides both precise results and understandable insights for three different groundwater ecotoxicity and drinking water safety assessments based on hydro-chemical data. The HydroNet-X system uses SHAP-based explainable artificial intelligence to improve prediction results and model understanding through its integration of Extreme Gradient Boosting and Adaptive Boosting and Polynomial Support Vector Machine and optimized ensemble learning. The model used 13 hydro-chemical parameters which meet WHO water quality standards to train and test its performance on a real-world dataset that included 1,345 groundwater samples from Madhya Pradesh India. The Water Quality Index (WQI) assessment produced four different drinkability classifications which included Excellent, Good, Poor, and Bad. The HydroNet-X model achieved exceptional classification accuracy with 99.2% which exceeded the performance of existing models such as XGBoost (98%) and Support Vector Machine (97%) and Decision Tree (96%) and Logistic Regression (93%) and AdaBoost (76%). The proposed framework demonstrated strong predictive performance through its achievement of an average F1-score of 0.994 and precision of 0.996 and recall of 0.995. The SHAP explainability analysis showed that Electrical Conductivity (EC) and Total Dissolved Solids (TDS) and Total Hardness (TH) serve as primary hydro-chemical indicators which determine groundwater ecotoxicity and drinkability assessment. The HydroNet-X framework delivers an accurate solution which can expand its capacity while maintaining its ability to monitor groundwater quality and assess environmental risks. The system enables sustainable water resource management through its decision support capabilities.