Rationally designing photocatalysts is crucial for the solar-driven nitrogen reduction reaction (NRR) due to the stable N≡N triple bond. Metal-organic frameworks (MOFs) are considered promising candidates but suffer from insufficient active sites and inferior charge transport. Herein, it is demonstrated that incorporating 3d metal ions, such as zinc (Zn) or iron (Fe) ions, into Al-coordinated porphyrin MOFs (Al-PMOFs) enables the enhanced ammonia yield of 88.7 and 65.0 µg g