Heavy metal pollution in the environment has become a significant global concern due to its detrimental effects on human health and the environment. In this study, we report an electrochemical aptasensor for the simultaneous detection of Hg2+ and Pb2+. Gold nanoflower/polyethyleneimine-reduced graphene oxide (AuNFs/PEI-rGO) was introduced on the surface of a gold electrode to improve sensing performance. The aptasensor is based on the formation of a T-Hg2+-T mismatch structure and specific cleavage of the Pb2+-dependent DNAzyme, resulting in a dual signal generated by the Exo III specific digestion of methylene blue (MB) labeled at the 3′ end of probe DNA-1 and the reduction of the substrate ascorbic acid (AA) catalyzed by the signal label. The decrease of MB signal and the increase of AA oxidation peak was used to indicate the content of Hg2+ and Pb2+, respectively, with detection limits of 0.11 pM (Hg2+) and 0.093 pM (Pb2+). The aptasensor was also used for detecting Hg2+ and Pb2+ in water samples with good recoveries. Overall, this electrochemical aptasensor shows promising potential for sensitive and selective detection of heavy metals in environmental samples.