Although the pollution of trace elements has been extensively studied, there is still a lack of comprehensive understanding regarding accumulation of these elements in lake ecosystems within the Yellow River basin, specifically the effects of lacustrine groundwater discharge (LGD) on trace elements. This study investigated the distribution, sources, and toxicity risks associated with 20 target trace elements (i.e., Li, Sc, Ti, V, Mn, Cr, Co, Ni, Cu, Zn, Rb, Y, Mo, Sb, Ba, W, Tl, Pb, U and Sr) in lake water (LW), groundwater (GW), and river water (RW) influenced by the LGD process in lake Ulansuhai and lake Daihai. The natural source is the primary contributor of trace elements in both LW and GW within the two lake basins, while industrial discharge plays a secondary role. The average LGD fluxes in lake Ulansuhai and Daihai basins were 6.39 × 105 m3/d and 1.07 × 105 m3/d, respectively. Additionally, the trace element fluxes from LGD in lake Ulansuhai (mean of 106,659.37 g/d) exceeded those observed in lake Daihai (mean of 3236.57 g/d). The overall toxicity risk was found to be higher in lake Ulansuhai (LW (17.36) > RW (16.81) > GW (12.76)) compared to lake Daihai (GW (10.43) > LW (9.10) > RW (4.63)). As well as the toxicity levels of trace elements in lake Ulansuhai were elevated compared to Daihai, which can be attributed to the influenced of ion compositions and water nutrients. Among them, Ca2+, Mg2+, and SO42+ were identified as key ions impacting the toxicity of trace elements in lake Ulansuhai. These findings provide crucial insights for targeted monitoring and mitigation of trace element pollution in the Yellow River basin’s lake ecosystems.