With respect to the rapid changes in climatic conditions, commerce, industrialization, and urbanization, the water quality of many shallow coastal aquifers in different parts of the world is under serious heavy metals pollution threats. In the current study, three water quality indexical models and hierarchical cluster analysis (HCA) were integrated to investigate the heavy metals contamination and drinking quality of groundwater from the coastal plain aquifer in Oshodi-Isolo area (Nigeria). Several groundwater samples were analyzed for pH and selected heavy metals such as Fe, Zn, Pb, Cu, Ni, Cr, Mn, and Cd. The pH values ranged from 5.1 to 6.9, with about 71.43% of the total groundwater samples indicating slightly acidic nature. Among the analyzed heavy metals, Cu contamination was predominant in over 80% of the samples. However, the water quality evaluation models revealed that the majority of the water samples are suitable for drinking. Based on pollution index of groundwater, 80.95% of the samples have insignificant pollution. Nonetheless, both synthetic pollution index and overall index of pollution classified 85.7% of the samples as excellent water suitable for drinking. The HCA was used to resolve the disparity between the results of the models. Two major water quality classes (excellent water and polluted water) were identified in this study based on the HCA. It is, therefore, recommended that the polluted water be treated before human consumption. Keywords Groundwater quality • Hierarchical cluster analysis (HCA) • Overall index of pollution (OIP) • Pollution index of groundwater (PIG) • Synthetic pollution index (SPI)