In this research, magnetite nanoparticles-activated carbon (MNP-AC) electrode was used as cathode through the electro-Fenton (EF) process to degrade Phenazopyridine (PhP). Graphite was used as anode and the reaction time was 120 min. The effects of main variables, including the applied current, initial pharmaceutical concentration, pH and magnetite nanoparticles (MNP) used as catalyst were investigated. PhP degradation efficiency observed for this method was 98.21% under optimum conditions (applied current = 0.2 A, [PhP]0 = 30 mg/L, pH = 3 and surface ratio of MNP/AC electrode 1:1). Scanning electron microscopy (SEM), Energy Dispersive X-Ray (EDX), X-ray diffraction (XRD) and Fourier-transform infrared spectroscopy (FT-IR) were performed for analyzing the structure of the electrodes. Oxygen reduction activity of the electrodes was examined by cyclic voltammetry (CV). Total organic carbon (TOC) was performed to investigate the PhP removal efficiency during the reaction time and Gas chromatography–mass spectrometry (GC–MS) were performed to analyze degradation by-products of PhP. In the presence of ethanol, the degradation efficiency of PhP was decreased to 54.34%. The PhP degradation efficiency was decreased about 6.93% after eight repeated runs. Based on the results, it was found this method can remove PhP from polluted water. To predict the performance of the degradation efficiency, artificial neural networks (ANN) model was established based on the experimental data.