With the continuous exposure of major food safety issues in recent years, food safety has become the focus of people’s attention. As a widely distributed bacterium, excessive levels of Escherichia coli in food may cause gastrointestinal discomfort symptoms, as well as adverse consequences such as food poisoning, acute gastroenteritis, food allergies, and gastric ulcers. Therefore, to ensure food safety and achieve rapid detection of E. coli, this study uses CdS quantum dots (QDs) nanomarkers to detect E. coli in water. Moreover, electrochemical square wave voltammetry is used to determine the relationship between Cadmium (Cd) ion concentration and E. coli concentration in the complex after enzyme-linked immunosorbent reaction. The experiment showed that the average particle size of CdS QDs nanoparticles was 5 nm and they had good biocompatibility. The current magnitude of electrochemical square wave voltammetry was positively correlated with the concentration of Cd ions and E. coli. When the concentration of E. coli was 50-1.0 × 105cfu/mL, its concentration was linearly positively correlated with the magnitude of the current, with a linear correlation coefficient of 0.9873. Compared to the flat plate counting method, its relative error did not exceed 10%, and in addition, the detection time was only 2 h. The above results indicate that CdS QDs nanomarkers can achieve rapid detection of E. coli, effectively improve the detection sensitivity of E. coli, and weaken non-specific adsorption.