Groundwater quality is a crucial aspect especially in the arid and semi-arid segments of the world due to its restricted availability. With increasing consumptions over time period, it is essential to ensure its quality by appraising complex hydro-geochemistry. In the present study, an attempt has been made to evaluate the groundwater hydro-geochemistry in the arid and semi-arid segment of Rajasthan, India and to fill the gap in understanding of groundwater quality by incorporating eXplainable Artificial Intelligence (XAI). 120 groundwater samples were collected during post monsoon season of 2022 and sixteen physico-chemical parameters were analyzed and corresponding inferences were drawn. The hydro-chemical facies indicated Na–Cl composition of groundwater with the dominance of evaporation. Majority of the samples showed reverse ion exchange process along with positive Saturation Index value of Calcite (CaCO3) and tendency towards leaching F− in the groundwater. Water Quality Index for drinking as well as irrigation purpose showed relatively better quality in the central segment than the marginal region. The SHAP values derived from the XGBoost model depicted fluoride (F-) as the primary feature influencing overall groundwater quality for drinking purposes, whereas the Sodium Absorption Ratio (SAR) emerged as the key predictor influencing overall groundwater quality for irrigation. The implication of proposed method signifies the importance of incorporating hydro-geochemical inferences with machine learning technique to understand the complex character of groundwater. Further, due to its robustness as well as cost-effectiveness, the application of the method would be helpful in policymaking to safeguard the groundwater resource in arid and semi-arid regions at global scale.