To remove phosphates and nitrates from municipal wastewater, an electrocoagulation process with membrane bioreactor process (EC-MBR) was used. Experiments were carried out incrementally to evaluate the new design. In a lab-scale (EC-MBR) treatment of municipal wastewater, the structure and distribution of the organic matter removal utilizing the membrane are being examined. The study's objectives were to evaluate the efficiency of the Al-Hawraa wastewater's organic matter removal process for nitrate (NO-3) and phosphate (PO4-3) as well as how it related to machine learning indicators. It was chosen to use an EC-MBR with operational parameters of 25 Co, pH 7 and DO (4-6 mg/L), initial and final concentrations of NO-3 (4.4-0.6 mg/L), and (PO4-3) (6.0-0.1 mg/L) to collect and analyze effluent from municipal wastewater treated using biological and chemical methods. According to the results, it may be possible to measure the effectiveness of organic matter removal using a neural network method. The results also showed that an overall reactor had agreeablemaximum NO-3 and (PO4-3) removal efficiencies of (87.6% and 98.1%), respectively. The accuracy model by its (98.1 and 85.7) for both NO-3 and (PO4-3) was effective, according to the models' accuracy results.