Mixed matrix membranes (MMMs) with the dual properties of porous materials and polymer matrix membranes have become one of the most optimal solutions to the gas separation problem. However, the adapted porous material and the explicit transport mechanism of gases within the mixed matrix membrane hinder its further commercialization. Thanks to their porous nature and tunable gas adsorption properties, heteroatom-doped porous materials, especially nitrogen-doped porous materials, are widely used to design and prepare advanced CO2 separation membranes. Herein, a layered two-dimensional nano-sheet with a nitrogen content of 44.7 % was successfully synthesized via thermal polymerization. And nano-sheets were homogeneously dispersed in a Pebax matrix to make a composite film. Since the CO2 affinity of the nitrogen functional site and the PEO flexible chain, realizing the synergistic improvement of CO2 permeability and selectivity. A comprehensive combined permeation experimental/simulation characterization reveals the CO2 transport pathway within the membrane, indicating the mechanism of action of nitrogen-doped porous packing on CO2 diffusion. Among these, the CO2 permeability of the mixed matrix film containing 5 wt% sodium poly(heptazine imide) (NaPHI) reached 153 Barrer at a feed gas pressure of 9 bar, nearly 149 % compared to the pure Pebax film. The selectivity of CO2/N2 was enhanced to 105, exhibiting a remarkable increase of 159 % and exceeding the 2019 Robeson limit. Importantly, the present work further reveals and demonstrates the gas separation mechanism of nitrogen-doped porous filler/polymer hybrid matrix membranes, which provides new ideas for the design and application of heteroatom-doped porous fillers in the field of gas separation.