The growth of the meat industry increases the generation of liquid effluents, which have a high polluting potential due to their chemical composition and it must be treated properly to minimize environmental impacts. One of the most used techniques is electrocoagulation, which uses the principle of electrochemistry where metallic electrodes are immersed in the effluent and connected to a source of electrical energy. To evaluate this technique, effluent from a pig slaughterhouse and packing plant wastewater was treated by electrocoagulation using a bench reactor. Aluminum electrodes were submerged in the effluent using a glass beaker and connected to a direct current source. The tests followed a central composite rotatable design with three independent variables: electric current density, electrolysis time, and distance between the electrodes. The measured color, turbidity, and chemical oxygen demand removal were 97.96%, 98.96%, and 67.44%, respectively. The residual aluminum ranged between 14 and 26 mg L-1. The statistical analysis demonstrated that in the operational condition of 20 min, 5.45 cm between the electrodes and electrical current density of 0.019 A cm(-2) it was possible to maximize the color removal, reaching 97.12% and at the same time minimize the cost of electrolysis, which is US $1.70 m(-3).