A facial hydrothermal method is applied to synthesize bismuth subcarbonate (Bi2O2CO3, BOC) with controllable defect density (named BOC- X) using sodium bismuthate (NaBiO3) and graphitic carbon nitride (GCN) as precursors. The defects of BOC- X may originate from the extremely slow decomposition of GCN during the hydrothermal process. The BOC- X with optimal defect density shows a photocatalytic nitrogen fixation amount of 957 μmol L-1 under simulated sunlight irradiation within 4 h, which is 9.4 times as high as that of pristine BOC. This superior photocatalytic performance of BOC- X is attributed to the surface defect sites. These defects in BOC- X contribute to a defect level in the forbidden band, which extends the light-harvest region of the photocatalyst from the ultraviolet to the visible-light region. Besides, surface defects prevent electron-hole recombination by accommodating photogenerated electrons in the defect level to promote the separation efficiency of charge carrier pairs. This work not only demonstrates a novel and scalable strategy to synthesize defective Bi2O2CO3 but also presents a new perspective for the synthesis of photocatalysts with controllable defect density.