Water environments contaminated by heavy metal ions present significant challenges because these pollutants do not degrade naturally, leading to their gradual bioaccumulation in animals and plants, which ultimately poses an insurmountable threat to human health. Therefore, rapid and accurate detection of heavy metal ions in water is of great significance for environmental protection and disease prevention. In this work, we developed a novel method based on microfluidic electrophoresis coupled with indirect chemiluminescence for the immediate detection of Cd(II), Pb(II) and Hg(II) heavy metal ions. The displacement of the Co(II) ions within the chemiluminescence mixture by the above migrating sample cations caused a measurable reduction in the background signal. The results showed that the detection limits of Cd(II), Pb(II) and Hg(II) ions under the best detection conditions were 5.83 × 10-8 M, 5.38 × 10-8 M and 2.09 × 10-8 M, respectively, which were 1-2 orders of magnitude lower than those of the indirect UV method and 1 order of magnitude lower than that of the indirect laser induced detection method. This method can provide a possibility for the rapid detection of multiple heavy metal ions in actual water environments.