An efficient broadband responsive two-dimensional (2D) heterometallic Zn-/Co-porphyrin conjugated polymer (ZnCoP-F CP) with its Co-porphyrin bridging unit bearing two perfluorophenyls is coupled with 2.0 wt% Pt-loaded graphite carbon nitride (PCN) to fabricate a novel 2D/2D nanocomposite (ZnCoP-F/PCN). The resultant ZnCoP-F/PCN composite with an optimal mass ratio exhibits broadband (UV–vis–NIR) responsive H2 evolution reaction (HER) activity up to 432 μmol h−1, 5.2 and 2.8 times higher than that of the ZnCoP-F CP (83 μmol h−1) and PCN (151 μmol h−1) alone, respectively. Furthermore, the ZnCoP-F/PCN displays excellent apparent quantum yields (AQY) of 18.2%, 18.3%, 17.6%, 16.5%, 13.9%, 8.7%, 5.1%, 4.3%, 1.9%, 0.95% and 0.62% at 350, 380, 420, 450, 500, 550, 600, 700, 785, 850 and 950 nm, which are also higher than that of ZnCoP-F CP illuminated at the respective monochromatic light. The enhanced broadband responsive HER performance of ZnCoP-F/PCN can be attributed to the easily assembled ZnCoP-F CP and PCN nanosheets through strong π–π stacking interaction, which can facilitate the fast charge transfer from ZnCoP-F CP to PCN for HER. This work opens a new pathway to fabricate porphyrin polymer-based nanocomposite for more efficiently converting solar radiation and water into H2.