The invention discloses a preparation method of halogen bismuth oxide nitrogen fixation photocatalysts with a three-dimensional structure. The preparation method comprises following steps: 1, a glucose aqueous solution is prepared; 2, hydro-thermal reaction, washing, centrifugation, and drying are carried out; 3, an obtained product is added into an acetic acid aqueous solution, and magnetic stirring is carried out; 4, Bi(NO3)3 5H2O is added, after complete dissolving, a halogeno salt of the same molar amount is added so as to obtain a brown precipitate; and 5, drying and sintering are carriedout so as to obtain the halogen bismuth oxide nitrogen fixation photocatalyst with a three-dimensional structure. According to the preparation method, template method is adopted to prepare a plurality of nitrogen fixation photocatalysts, preparation technology is simple, energy consumption is low, different halogeno salts can be adopted to prepare samples of a three-dimensional structure respectively, product purity is high, the morphology is uniform, the dispersibility is excellent, the performance is stable, and the circulation performance is excellent.