The self-cleaning ability and reusability of a membrane are critical in practical applications because they can severely affect the lifespan and the separation efficiency of the membranes. In this work, hydrophilic Zr-porphyrin metal–organic frameworks (MOFs) with different dimensions (2D or 3D) were embedded in the polyamide active layer to develop a self-cleaning membrane with enhanced separation performance. Zr-porphyrin MOF (3D) with excellent photocatalytic activity and uniform 1D open triangular channels can not only endow this membrane with visible-light photocatalytic ability for the degradation of organic dyes deposited on the membrane surface but also provide additional transport channels leading to a high membrane permeate flux. The optimum membrane exhibits a superior water permeate flux of 110.4 L m–² h–¹ (threefold higher than the pristine thin-film composite membrane) while maintaining very high dye rejection (close to 100%) for five dyes (anionic dyes: Congo red, Direct red 23, and Reactive Black 5 and cationic dyes: methylene blue and rhodamine B) and an outstanding photocatalytic degradation self-cleaning ability (the recovery of water permeate flux exceeds 97% after 4 cycles). Overall, this study may offer new inspiration for designing and tuning Zr-porphyrin MOF-based self-cleaning membranes with excellent dye removal ability.