Battery-type electrode materials typically suffer from intrinsically slow faradaic reaction kinetics, which severely limits the energy and power density of supercapacitors. Herein, we develop a hybrid of P-doped CoS2 (P-CoS2) nanoparticles confined in highly conductive P, S, N tri-doped carbon (P, S, N-C) porous nanosheets grown on carbon fibers through in situ thermal conversion of a metal–organic framework, followed by sulfurization and phosphorization. In this structural architecture, the heteroatom-enriched porous carbon nanosheets serve as a protective coating to inhibit changes in the volume of the P-CoS2 nanoparticles and offer efficient pathways for rapid charge transfer. The nanosized P-CoS2 substantially shortens the electrolyte ion diffusion distance and shows enhanced covalency after the introduction of P atoms, resulting in decreased migration energy of electrons during the redox reaction. In particular, the P dopants exhibit improved electrical conductivity and reduced adsorption energy between OH− and the nuclear Co atoms in P-CoS2, evidenced by density functional theory calculations. The designed P-CoS2@P, S, N-C electrode exhibits excellent rate capability and long-term cycling stability. Moreover, flexible solid-state asymmetric supercapacitor devices with P-CoS2@P, S, N-C as the cathode and Co@P, N-C as the anode deliver a high energy density of 56.4 W h kg−1 at 725 W kg−1 and a capacitance retention of 94.1% over 5000 cycles at 20 A g−1. The devices also exhibit uniform performance and outstanding bendability with slight capacitance decay under different bending conditions.