Carbon-metal composites are promising multifunctional electrocatalysts, but it is still challenging to prepare carbon-metal composites with tunable structure and strong metal-carbon interactions. Here, we present a unique gas-foaming assembly strategy to prepare cytosine-Co chelate derived Co and N codoped carbon nanotube (Co-NCNT). The structure for Co-NCNTs could be easily controlled by regulating cytosine-Co coordination or the carbonization temperature. The optimal Co-NCNT possesses homogeneous distributed NCNTs (10 nm), CoOx (5 nm) and CoNx moieties to synergistically boost electrochemical processes, and offer mesoporous nanosheet architecture to guarantee fast mass migrate and electron transfer. As a result, Co-NCNT shows remarkable ORR performance (onset potential of 0.93 V in 0.1 M KOH electrolyte) along with significant OER and HER activity. More important, it was found that CoNx moieties are responsible for the remarkable electrocatalytic activity in Co-NCNTs, because CoNx could alter active center, enhance metal-carbon synergy, decrease interfacial resistance and reinforce the strength of composites. Therefore, this paper not just demonstrates an advanced multi-functional electrocatalyst, but could also give deep understanding on the designing of multifunctional electrocatalysts. Copyright © 2020. Published by Elsevier Inc.