In order to obtain TiO 2 electrode with high photoelectrocatalytic activity, a novel N–F-codoped TiO 2 nanotubes electrode was prepared by electrochemical anodization of Ti in C 2H 2O 4·2H 2O + NH 4F electrolyte. The prepared electrode had a highly self-organized structure with high-specific surface area, and N and F were successfully doped into the lattice of TiO 2. When voltage during anodization was 20 V, annealing temperature was 673 K and anodic bias potential in the photoelectrocatalytic degradation was 0.25 V, N–F-codoped TiO 2 nanotubes electrode showed the higher catalytic activity. In addition, there was an obvious synergetic effect between the electrochemical and photocatalytic processes, and the synergetic factor R reached 8.7. This high-synergetic effect was attributed to the advantages of photoelectrocatalytic technique using high-aspect-ratio TiO 2 nanotubes and the promoting effect of N–F-codoping on the catalytic activity. Moreover, N–F-codoped TiO 2 nanotubes electrode showed good stability and after five times the photoelectrocatalytic efficiencies of MO still kept above 97% within 80 min.