In this study, a Z-type g-C3N4/BiOCl composite was synthesized by a one-step hydrothermal technique with varying loading amounts of graphene quantum dots (GQDs) to investigate their photocatalytic activity of N2 fixation to NH3 under simulated solar light irradiation. Experimental results showed that the photocatalytic activity of as-prepared GQDs/g-C3N4/BiOCl (GCNB) was significantly higher than those of pure g-C3N4 and BiOCl, and the rate of NH3 formation reached 1773.8 μmol/(h·gcat), which was 7.3 and 5.2 times greater than those of pure g-C3N4 and BiOCl, respectively. After five cycles of experiments, the N2 fixation ability of GCNB did not decrease obviously, indicating that GCNB had high photocatalytic stability. The excellent photocatalytic performance of GCNB was attributed to the broad light absorption range of BiOCl/ultrathin g-C3N4 binary materials and the unique photoelectronic properties of GQDs, which were loaded to form Z-type heterojunctions with a strong redox capability. A Z-type composite photocatalytic mechanism was proposed in this paper, which could significantly improve the charge separation efficiency and maintain a good redox capability. This study could provide an effective method for designing Z-type composite catalysts with high photocatalytic activity. Highlights g-C3N4 can enhance photocatalytic activity by slowing down the recombination of electron-hole pairs. GQDs is an excellent electron transport material sandwiched between g-C3N4 and BiOCl. GQDs/g-C3N4/BiOCl composite material had the best performance of photocatalytic ammonia synthesis The fixation mechanism of N2 in Z-type heterojunction photocatalytic system was investigated.