Although the flexible carbon film integrated with MXene has been proven to be a new generation of supercapacitor material with good energy storage prospects, the MXene oxidation and the lack of active sites during the preparation of the carbon film can lead to irreversible capacity loss. Herein, a flexible carbon film constructed by MXene-integrated N-doped cavity-interconnected porous carbon nanofibers was prepared by a non-pre-oxidation synthesis strategy combining electrospinning and metal–organic framework derivatization. This flexible carbon film overcomes the oxidation problem of MXene during the stabilization of polyacrylonitrile, and the derived porous structure of cavity interconnection exposes more active sites. Due to its unique structural characteristics and ideal chemical composition, this independent flexible carbon film exhibits significantly enhanced electrochemical performance as an electrode material for supercapacitors. It exhibits an energy density of 26.2 Wh kg−1 at a power density of 500 W kg−1, and a capacitance retention rate of 96.3 % after 10,000 charge–discharge cycles. This study provides a unique strategy for the preparation of high-performance flexible carbon films, and this technology can also be extended to other integrated CNF composites for the design of high-performance supercapacitor electrodes.