The main objective of this investigation was to evaluate the efficiency of electrocoagulation in eliminating nitrogen and phosphorous from domestic wastewater and to determine the main operating parameters affecting the process. Accordingly, an acrylic reactor and aluminum (cathode) and iron (anode) electrodes were used. The tests were performed based on a multilevel factorial experimental design, considering current intensity, treatment time, and pH as factors. The design response variables were the percentage of nitrogen and phosphorous removal. In the case of phosphorus, the removal rates of up to 99% were reached after 40 minutes of treatment with current intensities of 3 amps and at a modified pH of 6. The nitrogen removal was up to 27% with a treatment time of 40 minutes, 3 amps, and a pH of 6. A statistical analysis revealed that pH did not have a significant effect on the nitrogen removal process, whereas in the phosphorus removal, the three factors influenced the process at a confidence level of 0.05. The results indicate that the electrocoagulation process in this type of water is very efficient in the removal of phosphorus, whereas for nitrogen, the efficiency decreases noticeably. However, electrocoagulation has an advantage over other conventional treatment technologies, because it does not require additional treatment units to remove phosphorus.