In this study, the photochemical degradation of the antibiotic oxytetracycline (OTC) at different pH values was investigated in aqueous solution under visible and solar light irradiation. Particular emphasis was given to the kinetics and mechanism during the photolytic and photocatalytic degradation of OTC. A comparative study of the photolysis of OTC under solar light, with different initial concentrations and in the presence of scavengers of reactive oxygen species (ROS), revealed a self-photosensitization pathway with evidence of singlet oxygen generation at pH 8.5 and 11.0 during OTC photolysis. The three-dimensional fluorescence spectra of OTC at different pH values demonstrate that OTC only exhibits significant emission spectra at pH 8.5 and 11.0. The change of the internal electrostatic force between the electron withdrawing group and the dehydrogenation moiety of OTC as a function of solution pH values was proposed as a critical factor influencing the energy states and observed reaction pathways of OTC under light irradiation. Moreover, the mechanism of photochemical degradation of OTC was investigated with nitrogen and fluorine doped titanium dioxide (NF-TiO2) film at different pH values under visible and solar light in the presence of tert-butyl alcohol (TBA), sodium azide (NaN3), potassium iodine (KI) and catalase as scavengers. Five pathways, including direct photolytic degradation, UV/vis light-induced photocatalytic oxidation and reduction, and visible light-induced self-photosensitized oxidation and reduction, were proposed and verified during the photocatalytic degradation of OTC with NF-TiO2 film.