The aim of this research is to evaluate the effective parameters such as pH, current density (mA/cm2), H2O2/Fe2+ molar ratio, volume ratio of H2O2 to pharmaceutical wastewater (PhW) (ml/l) and reaction time (min) on the electro-Fenton process for the ibuprofen (as a pharmaceutical waste in water) removal. Since a synthetic wastewater with the same concentration of ibuprofen in a real pharmaceutical wastewater (400 ppm) was chosen in this research, the sample was tested in terms of the chemical oxygen demand (COD). The parameters were statistically optimized under response surface mythology (RSM). The software was also applied to minimize the number of runs. The optimum conditions for 98.29% COD removal experimentally were at pH of 2.43, current density of 23.08 mA/cm2, H2O2/Fe2+ molar ratio of 2.69, volume ratio of H2O2/PhW of 1.84 ml/l and reaction time of 28.08 min.