In the past decades, enormous efforts have been made to synthesize photocatalysts for N2 conversion driven by visible light. However, it is still a major challenge to develop an efficient photocatalyst. In this paper, monodoped and codoped TiO2 nanofibers were fabricated by vapor-phase growth. Vapor-phase implantation of the guest atoms into TiO2 nanofibers may greatly prolong the lifetime of electron-hole pairs. The doped TiO2 nanofibers were demonstrated to be an excellent photocatalyst for nitrogen photofixation under a 300 W Xe-lamp irradiation. The amount of ammonia produced over the Fe, V codoped TiO2 nanofibers reached 14 783 μmol/L·g-cata after irradiation for 2 h. The strategy could be easily extended to prepare other species doped TiO2 nanofibers as high-efficiency photocatalysts.