Multi-heteroatoms-doping tunes the electronic structure of the catalyst, thereby optimizing the intrinsic catalytic activity of tri-functional metal-free electrocatalyst. • This work provides a self-sacrifice template engineering strategy to synthesize NSCHCT as tri-functional metal-free electrocatalyst. • NSCHCT shows an excellent bifunctional performance towards ORR/OER and has a small ORR/OER voltage difference of 0.85 V. • The hollow hierarchical porous structure and multi-heteroatom-doped provide rich reactive sites. • ZAB based on NSCHCT1000 displays long-term stability of 55 h, which can drive a LED. Developing non-noble metal-based electrocatalysts for oxygen reduction reaction (ORR), oxygen evolution reaction (OER), and hydrogen evolution reaction (HER) is highly desirable, while still facing challenges. Herein, a self-sacrifice template engineering strategy that feasible carbonization of the copolymer of melamine-trithiocyanurim wrapped by polydopamine was developed to fabricate N, S hollow co-doped carbon tube (NSCHCT) based trifunctional electrocatalyst. Owing to the hierarchical structure, including hollow and porous structure, the obtained catalyst exhibits rich active sites and favourable mass transfer advantage, boosting the kinetic of the catalytic process. Moreover, multiple heteroatoms-doping provides various active sites. Notably, the thiophene sulfur combining with pyridinic N(p-N/S) and thiophene sulfur combined with graphitic N (g-N/S) shows the lowest activation energy barrier for OER/ORR and HER, respectively. As a result, the NSCHCT assembled Zinc-air battery shows excellent performance with a power density of 109 mW cm −2 and a high open-circuit voltage of 1.44 V, comparable with the Pt/C + RuO 2 system.