Metal–organic frameworks (MOFs) are coordination polymers with high porosity that are constructed from molecular engineering. Constructing MOFs as photocatalysts for the reduction of nitrogen to ammonia is a newly emerging but fast-growing field, owing to MOFs’ large pore volumes, adjustable pore sizes, controllable structures, wide light harvesting ranges, and high densities of exposed catalytic sites. They are also growing in popularity because of the pristine MOFs that can easily be transformed into advanced composites and derivatives, with enhanced catalytic performance. In this review, we firstly summarized and compared the ammonia detection methods and the synthetic methods of MOF-based materials. Then we highlighted the recent achievements in state-of-the-art MOF-based materials for photocatalytic nitrogen fixation. Finally, the summary and perspectives of MOF-based materials for photocatalytic nitrogen fixation were presented. This review aims to provide up-to-date developments in MOF-based materials for nitrogen fixation that are beneficial to researchers who are interested or involved in this field.