In this study, the experiments were carried out to evaluate the effect of five independent variables on the Chemical Oxygen Demand (COD) removal in a pharmaceutical wastewater contaminated with sodium diclofenac. The parameters were statistically optimized under response surface mythology. The optimum conditions for 97.21% of COD removal experimentally were at reaction time of 59.68 min, current density of 58.47 mA/cm2, pH of 2.89, volume ratio of 0.32 ml/l and H2O2/Fe2+ molar ratio of 3.60.