Abstract Nitrogen fixation using a photocatalyst in water presents both energy-efficient and environment-friendly than the traditional Haber-Bosch process. Artificial nitrogen fixation mostly produced ammonia (NH4+) and rarely made nitrate (NO3-). A photocatalytic reaction that simultaneously produced NH4+ and NO3- was few reported. In this work, nitrogen-vacancy pothole-rich few-layer g-C3N4 (PF-g-C3N4) was simply synthesized through ice-water bath ultrasound and rapid secondary sintering of bulk g-C3N4. PF-g-C3N4 can simultaneously realize photocatalytic nitrogen reduction reaction (NRR) and nitrogen oxidation reaction (NOR) to produce NH4+ (82.14 µmol L−1 h−1 gcat−1) and NO3- (109.96 µmol L−1 h−1 gcat−1) using air as N source in water without any sacrificial agent, and the total nitrogen fixation product yield of PF-g-C3N4 is 1.66 times higher than that of bulk g-C3N4. But in the presence of hole sacrificial agent and N2 as N source, the nitrogen fixation using PF-g-C3N4 was almost NRR to produce NH4+ (315.54 µmol L−1 h−1 gcat−1), and the total nitrogen fixation product yield of PF-g-C3N4 is 2.71 times higher than that of bulk g-C3N4. PF-g-C3N4 was more efficient than bulk g-C3N4 for nitrogen fixation because the nitrogen-vacancy pothole-rich few-layer structure provides more active sites, narrower band gap, and higher carrier separation and transfer efficiency. These new findings could provide novel insights into the metal-free g-C3N4, which can achieve both photocatalytic NRR and NOR, and this disproportionation reaction can be turned to NRR by not adding O2 and adding the hole sacrificial agent.