Porphyrinic metal‐organic frameworks (MOFs) are promising photosensitizers due to the lack of self‐aggregation of porphyrin in aqueous solution. However, how the topology of porphyrinic MOFs affects the generation of singlet oxygen (1O2) is unclear. Here, the effect of the topology of porphyrinic MOFs on their photodynamic performance is reported. Four porphyrinic zirconium MOFs (MOF‐525, MOF‐545, PCN‐223 and PCN‐224 with different topologies: ftw, csq, shp and she, respectively) were selected to study the influence of topology on the photodynamic antibacterial performance. The 1O2 generation and the photodynamic antibacterial performance followed an decreasing order of MOF‐545>MOF‐525>PCN‐224>PCN‐223. The results reveal that the pore size, the distance between porphyrin, and the number of porphyrin per Zr6O8 cluster in MOFs greatly affected 1O2 generation. This work provides guidance for designing new MOFs for efficient photodynamic sterilization.