A platform based on the bipolar electrode-electrochemiluminescence (BPE-ECL) and loop-mediated isothermal amplification (LAMP) was constructed for the detection of Escherichia coli O157:H7 (E. coli O157:H7). Firstly, the amplified product (double stranded DNA, dsDNA) of E. coli O157: H7 was efficiently obtained utilizing the LAMP technology. On the one hand, SYBR Green was added to the amplified product and colorimetric method was used to detect E. coli O157:H7. At a concentration of 10 CFU mL− 1 E. coli O157:H7 can only be qualitatively analyzed to determine the presence of the target bacteria. On the other hand, the methylene blue (MB) molecules were embedded in the dsDNA through electrostatic interactions. Then, by dropwise adding the mixture onto the cathode of the BPE, the ECL signal of Ru(bpy)32+ onto the anode was generated. Specifically, the BPE-ECL sensor displayed superior sensitivity for E. coli O157:H7 with a detection limit of 10 CFU mL− 1 and a wide linear concentration range of 101-106 CFU mL− 1. In summary, this sensor can effectively enhance the sensitivity and reliability of detection when compared to traditional colorimetric methods, and achieve qualitative and quantitative detection of E. coli O157:H7 by measuring the anode ECL signal of Ru(bpy)32+.