Using zirconium tetrachloride as a metal source and tetra(4-carboxyphenyl)porphyrin as a ligand and by in situ introducing octadecylphosphonic acid (OPA), three hydrophobic porphyrin zirconium metal-organic frameworks (MOFs) with different structural topologies were constructed, where these MOFs are labeled as OPA@PCN-222, OPA@PCN-223, and OPA@PCN-224. Compared with the original Zr-MOFs without the modification of OPA, the modified porphyrin Zr-MOFs show excellent hydrophobic properties and can maintain excellent stability in a long-term humidity environment. Meanwhile, OPA@PCN-222, OPA@PCN-223, and OPA@PCN-224 exhibit wide absorption of visible light and steadfast and expeditious photocurrent response by leveraging the properties of porphyrin ligands. When illuminated by visible light, the hydrophobic Zr-MOFs demonstrate an efficient reduction of CO