Due to its low viscosity, soybean oil is commonly used as edible oil. Its production is accompanied by a large amount of wastewater containing hazardous materials like phenolic compounds. In this study, the electro‐Fenton process with response surface methodology was applied for oil removal from wastewater of soybean oil plants. Five independent variables, including reaction time, pH, current density, molar ratio of H2O2 to Fe2+, and volume fraction of H2O2 to wastewater, were investigated for their effects on oil removal. The significant independent variables were optimized by the Box‐Behnken design. The optimum conditions were statistically obtained, and the results were confirmed by experiment. 92.66 % oil removal were experimentally found for the optimum conditions.