 SrHPO4 films were deposited on fluorine doped tin oxide coated glass (FTO) substrate by cathodic electrodeposition method for photoelectrocatalytic (PEC) oxidation of Rhodamine B (RhB). The as-prepared films were characterized by X-ray diffraction (XRD), Fourier transform infrared (FTIR), scanning electron microscopy (SEM) coupled with energy-dispersive X-ray spectroscopy system (EDXS) and atomic force microscope (AFM). The effect of different parameters on the RhB electrochemical degradation, including supporting electrolyte type and concentration, current density, pH, and initial dye concentration, is studied. The most efficient conditions were found to be a current density of 10 mA cm−2, NaCl as a supporting electrolyte with a concentration of 0.1 M and a neutral medium which is favorable for HClO oxidizing species generation. Compared to photocatalysis and electrocatalysis, the photoanode displayed more superior photoelectrodegradation efficiency. Indeed, 94.5% removal of RhB (10 mg/L) in 12 min is obtained. This good efficiency is due to the synergetic effect induced by combining electrodegradation with UV-light energy. The reached electrocatalytic performance of SrHPO4 makes it a new promising photoanode for the treatment of wastewaters contaminated by organic pollutants.