© 2019 Journal of Ecological Engineering. The objective of this study was to evaluate the efficiency of electrocoagulation in the removal of Escherichia coli from domestic and urban wastewaters and to determine the effects of the main operational parameters on the process. An electrocoagulation reactor with aluminum and iron electrodes was built for this purpose. A factorial design was applied, where amperage, treatment time, and pH were considered as the factors and E. coli percent removal was the response variable. After 20 min of treatment, > 97% removal efficiency was achieved. The highest E. coli removal efficiency achieved was 99.9% at a neutral pH of 7, amperage of 3 A, and treatment time of 60 min. However, the removal efficiency of close to 99% was also achieved at natural wastewater pH of 8.5. The statistical analyses showed that the three tested factors significantly affected the E. coli removal percentage (p < 0.05). These results indicate that electrocoagulation has a high disinfection power in a primary reactor in removing water contaminants as well as simultaneously removing pathogenic microorganisms when compared to biological treatment processes. This represents an additional benefit, because it will considerably reduce the use of chlorine during the final disinfection stage.