The consumption of contaminated vegetables has a great impact on human health. Due to this fact, we conduct the study to estimate the heavy metals in groundwater, soil, and vegetables by using the atomic adsorption spectroscopy (AAS) and find out the health risk using THQ and TCR caused by using these vegetables. The mean concentrations of As (0.015–0.40 mg/L), Cd (0.02–0.029 mg/L), Co (0.31–0.38 mg/L), Cr (1.02–1.09 mg/L), Cu (2.14–2.17 mg/L), and Hg (0.01–0.04 mg/L) are high in groundwater from threshold values given by WHO. The mean concentrations of As (22.17–23.14 mg/kg), Cd (4.21–4.54 mg/kg), Cu (21.24–24.36 mg/kg), and Pb (32.12–33.48 mg/kg) are high in soil samples from threshold values given by WHO. The mean concentrations of As, Cd, Pb, Cr, Fe, Hg, and Mn values exceeded the recommended values with concentration ranges: 1.75–4.56, 0.41–0.67, 2.12–3.12, 1.44–4.56, 87.12–135.25, 2.09–2.64, and 33.41–129.32 mg/Kg, respectively. The vegetable sample’s average concentration of heavy metals was in decreasing order cabbage ˃ brinjal ˃ okra ˃ tomato. The EDI values for As, Co, and Hg calculated for both adults and children is high. The target hazard quotients (THQ) for As, Co, and Hg are greater than the threshold value by consuming vegetables, which indicated the health risk for both adults and children. Similarly, HI due to tomato, cabbage, okra, and brinjal’s consumption is ˃ 1, with HI values 8.1975, 15.3077, 8.7312, and 10.2306, respectively. This advised the possible health effect in this area by using these vegetables. Target Cancer risk (TCR) exposed the adverse cancer risk persuaded by As, Cr, and Hg as their values exceeded the normal range by USEPA by consumption of these vegetables. This study concluded that vegetables imply the total health risk on local people, and regular monitoring of heavy metals is strongly suggested in this region.