In recent decades, carbon nanomaterials have attracted a lot of attention in the field of energy storage and conversion due to their exceptional mechanical, electrical and chemical properties. Nevertheless, pristine carbon nanomaterials possess inert surface and uncontrollable band gap, greatly restricting their application. Doping heteroatoms into carbon skeleton has been verified as a valid strategy to adjust the electronic structure and physicochemical properties of carbon nanomaterials, which opens a new avenue to improve the electrochemical performance of carbon nanomaterials. Herein, we first give a simple description of carbon nanomaterials and the necessity of doping heteroatoms. Then we discuss and analyze the doping types and doping methods of heteroatoms-doped carbon nanomaterials. Afterwards, the specific electrochemical applications of heteroatoms-doped carbon nanomaterials are systematically introduced from the perspective of fuel cells, lithium-ion batteries, lithium-sulfur batteries and supercapacitor. Eventually, the possible challenges in the near future for the synthesis of heteroatoms-doped carbon nanomaterials and their related electrochemical application in the field of energy storage and conversion are summarized.