Photocatalytic nitrogen fixation represents a green alternative to the conventional Haber-Bosch process in the conversion of nitrogen to ammonia. In this study, a series of Bi5O7Br nanostructures were synthesized via a facile, low-temperature thermal treatment procedure, and their photocatalytic activity toward nitrogen fixation was evaluated and compared. Spectroscopic measurements showed that the tubular Bi5O7Br sample prepared at 40 °C (Bi5O7Br-40) exhibited the highest electron-transfer rate among the series, producing a large number of O2.- radicals and oxygen vacancies under visible-light photoirradiation and reaching a rate of photocatalytic nitrogen fixation of 12.72 mM·g-1·h-1 after 30 min of photoirradiation. The reaction dynamics was also monitored by in situ infrared measurements with a synchrotron radiation light source, where the transient difference between signals in the dark and under photoirradiation was analyzed and the reaction pathway of nitrogen fixation was identified. This was further supported by results from density functional theory calculations. The reaction energy of nitrogen fixation was quantitatively estimated and compared by building oxygen-enriched and anoxic models, where the change in the oxygen vacancy concentration was found to play a critical role in determining the nitrogen fixation performance. Results from this study suggest that Bi5O7Br with rich oxygen vacancies can be used as a high-performance photocatalyst for nitrogen fixation.