In the present study, second-generation polyamidoamine dendrimer functionalized magnetic nanoparticles (Fe3O4@G2-PAD) were synthesized and applied for the measuring of Pb2+ and Cd2+ ions in environmental waters. The square wave anodic stripping voltammetry (SWASV) was applied for simultaneous determination of analyte cations after closed-circuit mode. The influence of experimental variables on the performance of the modified magnetic electrode was investigated and optimized. Under optimum conditions, the resulting sensor depicted a linear response to Pb2+ and Cd2+ over a concentration range from 0.5 to 80 ng mL1. Low detection limits of 0.17 ng mL1 for Pb2+ and 0.21 ng mL1 for Cd2+ were obtained following 140 s accumulation time, which are well below than the World Health Organization (WHO) guideline (3 ng mL1 for cadmium and 10 ng mL1 for lead) in drinking water. The prepared sensor was successfully applied to the detection of Pb2+ and Cd2+ in the presence of some potentially interfering ions. In addition, the electrochemical sensor was employed for the determination of both heavy metal ions in the real water samples (river water, wastewater and lake water) and the obtained results were satisfactory compared with graphite furnace atomic absorptions spectrometry (GF-AAS) protocol.