The pyrolysis of metal-organic frameworks (MOFs) has emerged as a promising route to synthesize carbon/metal oxide-based materials with diverse phase compositions, morphologies, sizes and surface areas. In this paper, 1,3,5-benzoic acid (BTC) and 2,4,6-tri(4-pyridinyl)-1-pyridine (TPP) were used as ligands to prepare a novel cobalt-based MOF ( Co-MOF ) which was used as a precursor to obtain five carbon-based materials at different temperatures ( Co-C200/400/600/800/1000 ). Furthermore, five dyes were used as degradation targets to investigate the photocatalytic degradation performance of the title materials under UV light irradiation. Co-C1000 exhibited the best photocatalytic degradation performance for methyl orange (MO), and the degradation rate could reach 99.21%. The enhanced photocatalytic activity was attributed to narrower band-gaps and a synergistic effect originating from the well-aligned straddling band structures between Co/CoO/Co 3 O 4 and C, also resulting in a faster interfacial charge transfer during the photocatalytic reaction. This study will aid in the development of photocatalysts generated from carbon-based materials via the pyrolysis transformation of MOFs, therefore greatly enhancing the photocatalytic performance.