More and more porphyrin-based functional materials have been developed and applied in the energy field, including metallic porphyrins (MPs), metal–organic frameworks (MOFs), covalent–organic frameworks (COFs), conjugated microporous polymers (CMPs) and organic–inorganic composite materials.