Photoreduction of N₂ is among the most interesting and challenging methods for N₂ fixation under mild conditions. In this study, we determined that nitrogen vacancies (NVs) could endow graphitic carbon nitride (g-C₃N₄) with the photocatalytic N₂ fixation ability. Photocatalytic N₂ fixation induced by NVs is free from the interference of other gases. The reason is that NVs could selectively adsorb and activate N₂ because NVs have the same shape and size as the nitrogen atom in N₂. In addition to this, NVs could also improve many other properties of g-C₃N₄ to support photocatalytic N₂ fixation. These new findings could elucidate the design of efficient photocatalysts for photocatalytic N₂ fixation.