Porous carbon materials show great potential as electrode materials for supercapacitors due to their high specific surface area, good conductivity, and excellent electrochemical stability. However, the electric double-layer energy storage mechanisms limit the energy density of porous carbon supercapacitors. Introducing heteroatoms into carbon materials can improve conductivity and surface wettability and generate extra pseudocapacitance, thus significantly enhancing energy densities. In this review, we systematically summarize the advantages of heteroatoms-doped porous carbon materials, the effect of heteroatomic type or content differences on polarity, surface energy, adsorption energy, impedance, energy bands, and other aspects of carbon materials, and even result in defects affecting the structure and electrochemical properties. In the end, the current challenges and future perspectives are summarized, aiming to provide a comprehensive understanding of the potential and limitations in this field. Porous carbon materials with rich heteroatom functional groups are expected to be developed in lithium/sodium/potassium/zinc-ion batteries, fuel cells, electrocatalysis, and other fields.