Groundwater is a crucial water supply source in Chengdu City, western China, a region experiencing significant water scarcity. The sources of inorganic pollutants in groundwater and their potential health risks are of great concern. In this study, based on 156 groundwater samples collected in 2021 in the study area were analyzed for hydrochemical characterization and controlling factors. The Positive Matrix Factorization (PMF) model was used for contaminant source analysis, and Monte Carlo Simulation (MCS) combined with the Health Risk Evaluation Model (HREM) was used to quantify the health risks. The results indicate that the groundwater in the study area is predominantly of the Ca·Na-SO4·HCO3, Ca·Na-HCO3·SO4 and Ca-HCO3·SO4 types, mainly influenced by the combination of evaporation-concentration-crystallization and rock leaching-weathering. K+, Na+, and Cl− mainly originate from the weathering and dissolution of potassium feldspar and rock salt, while Ca2+, Mg2+, HCO3−, and SO42− primarily come from the weathering and dissolution of sulfate minerals. The main sources of groundwater pollution and their contributions are as follows: domestic pollution (25.6 %), dissolution-filtration-evaporation-concentration action (22.8 %), hydrogeochemical evolution (15.8 %), water-rock interactions (12.8 %), primary geologic context (12.1 %), and agricultural non-point source pollution (11.0 %). Cl− and As are the primary contributors to non-carcinogenic and carcinogenic risks, respectively. Non-carcinogenic risks are below USEPA standards, while the average carcinogenic risk for arsenic exceeded the maximum acceptable risk level thresholds by 23 and 109 times for adults and children, respectively. Non-carcinogenic and carcinogenic health risks were mainly influenced by pollutant concentrations. The primary geological background and domestic pollution contributed the most to the non-carcinogenic risk for adults (50.3 %) and children (77.1 %), and 38.2 % and 10.3 %, respectively. This study highlights the necessity of establishing a comprehensive groundwater pollution monitoring system, enhancing industrial waste management practices, and raising public awareness to mitigate contamination and ensure the sustainable use of groundwater resources in Chengdu City.