The hollow carbon spheres with abundant doping elements and adsorption boundaries are achieved by utilizing cobaltous oxide as template and polypyrrole as carbon/nitrogen sources through low-temperature pyrolysis under inert gas atmosphere. The redox reaction and mutual interaction between metal oxide and polymer might account for rich nitroge-noxygen (N/O) dopants, while low-temperature pyrolysis results in hydrogen-terminated (H) edges. Furthermore, the functionalized carbon layer and highly disordered microstructure are promoted to form in the amorphous carbon. For N/O-rich carbon hollow sphere (NOCHS), the unique twisted boundaries, numerous adsorption sites and porous shell are strongly linked with its electrochemical performances in lithium and sodium storage, which demonstrate dominant storage capacity, ultra-stable storage ability and superior rate capability over other amorphous carbon materials beyond typical graphite.