Heavy metal ions have significant risks to both environment and human health, and their detrimental effects are irreversible. Therefore, a sensor capable of simultaneous detecting heavy metal ions with high accuracy presents a significant challenge. In this work, a conductive hydrogel was synthesized using 2-acrylamido-2-methyl-1-propanesulfonic acid (AMPS), methacrylamide (MAM), and hydroxyethyl methacrylate (HEMA) as monomers, N, N’-methylenebis(acrylamide) as the crosslinker, through physically doping with silver nanoparticles. The prepared hydrogel has the characteristics of good conductivity, excellent swelling ability and high adsorption capacity for enrichment of heavy metal ions (HIMs). The three-dimensional network hydrogel was directly used for simultaneous detection of HIMs in multiplex system, with superior separation ability, good linear ranges, excellent reproducibility and good long-time stability. Additionally, this sensor can accurately detect Cu2+ in river sample, demonstrating high precision and applicability. The fabrication of the hydrogel electrochemical sensor is simple and mild, allowing for the electrochemical capture of various HIMs and holds practical application prospect.