In this study, boron carbon nitride (BCN) nanostructures were used as photocatalyst which was synthesized in a chemical vapor deposition reactor. Photoelectrocatalysis was used for degradation organic pollutants from produced water. BCN nanostructures were coated on a coil-type copper wire to be as anode electrode in the photoelectrocatalytic process. The effect of different parameters on chemical oxygen demand (COD) removal efficiency from produced water was investigated by a central composite design (CCD) to maximize photoelectrocatalysis influence as one of the most used methods of wastewater treatment. A 12 run Plackett–Burman design was used for screening of the parameters (initial COD, electrical conductivity, applied cell voltage, UV lamp wavelength, H2O2 concentration, residence time, and initial pH) which led to the selection of residence time and initial pH as effective parameters. Since the core goal of this study was to maximize the COD removal efficiency, the steepest ascent method was used to propel these two parameters to the optimum region. Finally, CCD showed that applying photoelectrocatalysis could lead to 88.79% of the COD removal efficiency which would be an optimum value at a residence time of 15.85 min and a pH value of 3.3. Ultimately, this result was confirmed by experimentation at those conditions.