The study was designed to assess the effective elimination of total phosphorus (TP) and chemical oxygen demand (COD) from pretreated wastewater generated by the splitting of rape oil soapstock rich in phospholipids. The wastewater indicated a high-TP content (108 mg/L) and COD 1488 mg/L. The optimization tests were carried out using a five-level, four-variable central composite rotatable design, and the tested variables included initial H 2 O 2 concentration (X 1 ), Fe 21 /H 2 O 2 molar ratio (X 2 ), initial temperature (X 3 ), and wastewater pH (X 4 ). TP and COD mathematical models of changes were developed as a function of tested variables based on the test results. Statistical analysis of the resultant models permits the conclusion that all tested variables substantially influence the effective removal of COD, whereas the initial pH of wastewater has no considerable impact on the effective elimination of TP. The optimal conditions of the Fenton process were achieved for X 1 5 4.5 g/L, X 2 5 0.1, X 3 5 308C, and X 4 5 9. It is possible to reduce TP to 1.05 mg/L and COD to 132.1 mg/L under such conditions.