One of the main issues with membrane-based gas separation lies in the unexplored relationship between the precursors and their derived carbon molecular sieve membranes (CMSMs). Herein, we designed a series of TR polymers with gradient PBO content as precursors to investigate the carbonization mechanisms of PBO structure. The process of transforming the polymer precursor into carbon structure throughout pyrolysis involves utilizing an array of characterization techniques along with pyrolysis simulation. Results indicated that a higher PBO content leads to stronger molecular sieving effect of the resulting CMSM. The TR-CMS-50 membrane demonstrated exceptional gas separation performance with high permeability (PH2 = 3154 and PCO2 = 1495 Barrer) as well as ultra-high H2/CH4 (384) and CO2/CH4 (166) selectivity, which far exceeded the newest Upper bound line, showing significant potential for practical applications. This may can be attributed to “delayed effect” of the PBO structure which requires pyrolysis at higher temperatures, leading to more intense pyrolysis and the release of nitrogen-containing substances. Meanwhile, PBO has a cyclic system with a strong aromatic structure that closely resembles a carbon strand, which probably facilitates aromatization and enables it to more easily integrate into CMS structure, resulting in a more orderly arrangement in the Langmuir phase and generating higher concentration of pyrrolic-N (58.7 % vs. 44.1 %) as well as graphitic-N (31.6 % vs. 17.2 %). Thus, increasing the PBO content makes the derived CMS denser and significantly enhances its molecular sieving capacity. This study offers new insights into the development of precursor structures that creates high-performance CMSMs.