Photocatalytic nitrogen reduction presents a promising technology for environmentally friendly ammonia synthesis under mild conditions. However, the performance of photocatalysts is often hindered by high charge carrier recombination and insufficient adsorption and activation of nitrogen molecules. A novel Bi12O17Cl2/BiOCOOH/Bi2MoO6 heterojunction photocatalyst was successful synthesis through surface ion-exchange technique by potassium chloride. The introduction of Bi-rich Bi12O17Cl2 on BiOCOOH/Bi2MoO6 heterojunction not only improves electron transfer efficiency due to the dual type-II heterojunction effect but also facilitates on-site N2 adsorption and activation for solar ammonia production by promoting oxygen vacancies. The high photocatalytic nitrogen fixation activity of the Bi12O17Cl2/BiOCOOH/Bi2MoO6 was 107.78 μmol g−1 h−1 without any sacrificial agent. DFT calculations indicate that oxygen vacancies serve as the active site for adsorbed N2, the hydrogenation process preferentially forms on the distal N2 atom with a lower activation energy about 0.6 eV. Therefore, the combination of oxygen vacancies and band engineering accelerates the production of ammonia. This endeavor holds the potential to unleash the capabilities of engineering for Bi-rich heterojunctions materials with oxygen vacancies, thereby achieving high-efficiency solar-driven N2-to-NH3 conversion in aqueous environments.