This study has been conducted to appraise the concentrations of selected heavy metals and total dissolved solids (TDSs) in the drinking water from shallow wells in parts of Ibadan metropolis, southwest Nigeria. Fifteen (15) water samples were collected from three representative residential locations [traditional core area (TCA), peri-urban area (PUA), and urban area (UA)] for geochemical analysis. Heavy metals and TDS were analyzed with the aid of atomic absorption spectrophotometer and calibrated meter, respectively. The mean concentration (mg/L) of Zn, Pb Mn, Fe, and Cd has been 3.930, 0.658, 0.0304, 1.698, and 0.501, respectively, and as a consequence, the order of abundance of studied metals was Zn > Fe > Pb > Cd > Mn. Concentrations of Zn, Fe, Pb, and Cd were higher than recommended standards in 60%, 86.7%, 100%, and 100% of groundwater samples, respectively. However, at all points tested, the mean concentrations of Mn and TDS in water samples lie within the safe limits set by World Health Organization. The evaluation of geoaccumulation index (Igeo), enrichment factor (EF), and contamination factor suggests that representative water samples were low-to-moderate contamination. The potential ecological risk index advocates low-to-moderate ecological risk in TCA and PUA, while it demonstrated exclusive “moderate” risk in UA. Further, the range of pollution load index (PLI) (0.55–1.32) in both TCA and PUA shows nil-to-moderate pollution status, while PLI values > 1 in UA indicate moderate contaminated state. The degree of contamination in groundwater showed the following trends: UA > TCA > PUA in the study area. Moreover, the results of EF and quantification of contamination of analyzed metals in water samples indicate geogenic and anthropogenic inputs. The contribution of studied metals to the incidence of non-cancer risk via oral intake within the residential sites follows the order: cadmium > lead > zinc > iron > manganese. The hazard index as a result of ingested heavy metals for the three population classes surpasses the acceptable range in the order of infant < child < adult. Cadmium and lead made considerable impact to the estimation of cancer risk in the study area for the three human population categories. Factor analysis extracted only one component that explained 94.64% of the entire variance, while cluster analysis identified three distinct groups based on similar water quality characteristics. Based on the findings of the study, awareness programs toward protecting the shallow groundwater sources should be launched, encouraged, and sustained. Moreover, the study suggests better hygienic practices and pre-treatment of contaminated water before consumption.