The synthesis of ammonia via the Haber–Bosch process requires high temperature and high pressure, which causes about 1.6% of global CO2 emission every year. the development of a low-cost, facile ammonia synthesis method under ambient conditions is urgently required. Herein, we employed a facile approach to prepare defective g-C3N4 nanorods with a narrower bandgap and a sub-gap, which can significantly enhance the light utilization ratio. More importantly, the defects of g-C3N4 nanorods can also enhance the light adsorption and boost cleavage of N2 molecules, which is the rate-determining step of nitrogen fixation. Compared with bulk g-C3N4, the photocatalytic N2 reduction rate of defective g-C3N4 nanorods as the catalysts was increased by 3.66 times. According to the density functional theory calculation results, the active sites should be an extra carbon in the ring formed in s-triazine rings. This work may provide in-depth insights into the development of novel defective photocatalysts for N2 fixation.