N‐doped carbon nanomaterials have rapidly grown as the most important metal‐free catalysts in a wide range of chemical and electrochemical reactions. This current report summarizes the latest advances in N‐doped carbon electrocatalysts prepared by N mono‐doping and co‐doping with other heteroatoms. The structure–performance relationship of these materials is subsequently rationalized and perspectives on developing more efficient and sustainable electrocatalysts from carbon nanomaterials are also suggested.