Methylene blue (MB) is a toxic and colorful organic matter that exists in the wastewater of textile industries. Difficult biodegradability of MB causes biological treatment methods that cannot sufficiently biodegrade it. In photoelectrocatalytic (PEC) methods, by converting the radiation energy to the electricity, MB is degraded efficiently in the anolyte chamber. Using the ultrafiltration (UF) membrane rather than a high-priced cation exchange membrane (CEM) decreases the cost of the PEC pilot. Therefore, in this study, different dependent and independent variables that affect the performance of the PEC are investigated to evaluate the technical feasibility of using ultra-filtration membrane as a separator of anode and cathode chambers. The results demonstrate an increase in the anolyte MB concentration up to 15 mg/l augments the PEC performance. In the best condition, the MB, turbidity, and color removal percent are 51.56%, 65.62%, and 64.19%, respectively, and produced power is 1.075 μW when the anolyte MB concentration, the pH, and the illumination density are 15 mg/l, 3, and 12 W, respectively. Also, the results indicate the removal percentage of the MB, turbidity, and color in either anolyte or catholyte rises in the anolyte acidic conditions and higher illumination densities. Besides, the changes in the EC and pH of anode and cathode chambers during the experiment are investigated, and finally, the relations between MB, color, and turbidity removal percentage are evaluated. As a result, it is found that the UF membrane is a suitable candidate to be used in PEC pilots.