Developing heterogeneous cobalt-based catalysts that combine high activity with resistance to cobalt leaching remains challenging for liquid-phase olefin hydroformylation. Herein, a polymerization-pyrolysis strategy was employed to construct highly dispersed cobalt species within a nitrogen-containing carbon environment on carbon nanotubes (Co-N/CNTs). A cobalt-containing melamine-formaldehyde precursor was assembled on CNTs and pyrolyzed at 700-1000 ℃, enabling systematic regulation of cobalt dispersion, nitrogen functionalities and porous structure. Among these resulting catalysts, Co-N/CNTs-900 exhibited the highest catalytic performance for 1-octene hydroformylation, affording complete conversion with a 79.5% aldehyde yield and an apparent TOF of 93.8 h-1 at 150 ℃ and 5 MPa syngas pressure. The high activity was associated with the combination of highly dispersed cobalt species, well-developed porous structure and strong association of cobalt with nitrogen-containing sites. Co-N/CNTs-900 retained substantial catalytic activity over four recycling runs, with a cumulative decrease in cobalt content of 33.1%, compared with 54.8% and 68.4% for conventionally impregnated Co/N-CNTs-450 and Co/oCNTs-450 after two runs. These results demonstrate that controlling the local nitrogen-containing carbon environment provides an effective strategy to balance cobalt dispersion, catalytic accessibility and resistance to metal leaching in heterogeneous olefin hydroformylation.