The main obstacles to the photocatalytic reduction of nitrogen are the low separation efficiency of photogenerated charges and the few activation sites for nitrogen. It is highly desirable to explore new strategies for improving the nitrogen fixation performance of catalysts. Herein, the Bi metal active sites are constructed on the surface of BiOBr/BiOI heterojunction by in situ reaction, which promote the absorption, activation, and dissociation of nitrogen molecules. Moreover, the existence of Bi metal and BiOBr/BiOI heterojunction enhances the light absorption ability and facilitates the separation and transfer of photogenerated charges. The theoretical calculation also demonstrates that the BiOBr/BiOI/Bi composite has excellent electron structure and electron transfer efficiency. So, the ternary BiOBr/BiOI/Bi catalyst shows excellent performance of photocatalytic reduction of nitrogen to ammonia. The nitrogen reduction rate is 221.9 μmol g−1 h−1, which is 7.6 and 5 times higher than that of pure BiOBr and BiOBr/BiOI. The mechanism of photocatalytic nitrogen fixation of the BiOBr/BiOI/Bi is proposed based on the experimental and theoretical results. This study provides a novel method for improving the photocatalytic nitrogen reduction performance of catalysts.