This research was based on the investigation of a major principle, regarding the effects of NaCl and KH2PO4 concentrations on struvite recovery, with electricity production using magnesium-air fuel cell electrocoagulation, in accordance with the concentration of phosphorous and chloride. The weight ratio of N:P in the synthetic wastewater was in the range of 1.2–21. The concentration of NH4Cl was fixed at 0.277 M (approximately 3888 ppm as NH3-N and 5000 ppm as NH4), while PO4-P was in the range of 0.006–0.1 M. In addition, the concentrations of NaCl as electrolyte were 0, 0.01, and 0.1 M. Phosphate removal increased linearly with the Mg:P ratio, up to approximately 1.1 mol mol−1, irrespective of the initial concentrations of phosphate and NaCl. The one-to-one reaction as mole ratio between phosphate and the dissolved Mg ions resulted in phosphate removal, with the production of a one-to-one magnesium/phosphate mineral, such as struvite. The average removal rate of phosphorous in experiments without a dose of NaCl was 4.19 mg P cm−2 h−1, which was lower than the relative values of 5.35 and 4.77 mg P cm−2 h−1, in experiments with 0.01 and 0.1 M NaCl. The dissolution rate of Mg with electro-oxidation determined the rate of phosphorous removal with struvite recovery. The average removal rates of phosphorous with dose concentrations of 0.006, 0.01 and 0.02 M KH2PO4 were 4.02, 5.54, 6.9 mg P cm−2 h−1, respectively, which increased with the increase in KH2PO4 dose. However, in experiments with a dose of 0.05 and 0.1 M KH2PO4, the average removal rates of phosphorous decreased to 4.84 and 2.51, respectively. The maximum power densities in the electrolyte mixture of 0.05 M KH2PO4/0.277 M NH4Cl, 0.01 M NaCl/0.05 M KH2PO4/0.277 M NH4Cl, and 0.1 NaCl/0.05 KH2PO4/0.277 M NH4Cl were 25.1, 26.4, and 33.2 W/m2, respectively. The increase in the NaCl dose concentration resulted in an increase in the maximum power density and current density. A dose above 0.05 M KH2PO4 resulted in the decrease of the maximum power densities. However, when the dose was below 0.05 M KH2PO4, the maximum power density increased with the increase in KH2PO4 dose.