Activation is a common strategy to tailor microstructure of carbon materials. A new activation combined with heteroatom doping of carbon nanofibers is proposed to synthesize the N, S-doped carbon nanofibers (NSCNFs). After electrospinning and followed thermal treatment with thiourea, the diameter of the as-obtained NSCNFs decreases with much more abundant pore structure and functionalized with S-containing oxygen groups compared with that obtained without activation. The increased specific surface area and pore volume are beneficial to facilitate the Na+ diffusion and provide more active sites to increase adsorption capacitance and facilitate pseudo-capacitive reactions. Also, the S-containing oxygen groups contribute to pseudo-capacitance by faradaic reactions. As a result, capacitive behavior is boosted hence leading to a excellent rate capability and cycling stability. The flexible and freestanding NSCNFs film is directly used as anode for sodium-ion batteries (NIBs) and shows excellent rate capability with reversible capacity of 147 and 133 mA h g-1 at 10 and 30 A g−1, respectively. Remarkably, ultra-long cyclic life is also achieved with 90.8% capacity retention after 6000 cycles at 10 A g−1. Such electrochemical performance makes NSCNFs promising to be used in high power and durable NIBs. This activation strategy can also be expanded to functionalize other carbon materials.