The removal of turbidity from abattoir wastewater (AWW) by electrocoagulation (EC) was modeled and optimized using Artificial Intelligence (AI) algorithms. Artificial neural networks (ANN), adaptive neuro-fuzzy inference systems (ANFIS), particle swarm optimization (PSO), and genetic algorithms (GA) were the AI tools employed. Five input variables were considered: pH, current intensity, electrolysis time, settling time, and temperature. The ANN model was evaluated using the Levenberg-Marquardt (trainlm) algorithm, while the ANFIS modeling was accomplished using the Sugeno-type FIS. The ANN and ANFIS models demonstrated linear adequacy with the experimental data, with an R2 value of 0.9993 in both cases. The corresponding statistical error indices were RMSE (ANN = 5.65685E-05; ANFIS = 2.82843E-05), SSE (ANN = 1.60E-07; ANFIS = 3.4E-08), and MSE (ANN = 3.2E-09; ANFIS = 8E-10). The error indices revealed that the ANFIS model had the least performance error and is considered the most reliable of the two. The process optimization performed with GA and PSO considered turbidity removal efficiency, energy requirement, and electrode material loss. An optimal turbidity removal efficiency of 99.39 % was predicted at pH (3.1), current intensity (2 A), electrolysis time (20 min), settling time (50 min), and operating temperature (50 °C). This represents a potential for the delivery of cleaner water without the use of chemicals. The estimated power consumption and the theoretical mass of the aluminium electrode dissolved at the optimum condition were 293.33 kW h/m3 and 0.2237 g, respectively. The work successfully affirmed the effectiveness of the EC process in the removal of finely divided suspended particles from AWW and demonstrated the suitability of the AI algorithms in the modeling and optimization of the process.