Covalent organic frameworks (COFs) have shown great promise for photocatalytic hydrogen evolution from water and photocatalytic degradation of organic pollutants. However, a single COFs suffers from poor photogenerated charge separation efficiency. In this study, we synthesized persistent luminescent nanoparticles (PLNPs)@COFs composites with core–shell heterostructures by the in situ growth of COFs on the surface of PLNPs. The PLNPs@COFs composites demonstrated better photocatalytic performance than pure PLNPs and COFs. The hydrogen production rate of PLNPs@COFs (1:6) was about 35 mmol h−1 g−1, and the photodegradation efficiency of Rhodamine B by PLNPs@COFs (3:1) reached 100 % in 50 min. Evidently, the combination of COFs with PLNPs to form a core–shell heterostructure with a tight contact interface can effectively improve the photogenerated charge separation efficiency. Our covalent bonding and in situ growth approach is more conducive to the formation of stable core-shell heterostructures. A good match between the persistent luminescence emission spectrum of the PLNPs and the absorption range of the COFs improves the potential of PLNPs@COFs to function as a round-the-clock photocatalyst. This strategy holds excellent promise in the efficient use of solar photocatalytic hydrogen evolution and in environmental purification in the future.