Atomically doped carbon (ADC) materials (including non-metal heteroatom doped carbon materials and atomically dispersed metal-carbon materials ) have been regarded as the most promising catalysts for many energy conversion and storage technologies, thanks to their unique atomic structure and properties, and most importantly, exceptional electrochemical performance. However, their state-of-the-art preparation has heavily relied on costly precursors and rigid conditions, yet still resulting in relatively low contents of atomic non-metal/metal species. We proposed and demonstrated two general, simple yet highly efficient and readily scalable synthetic approaches, respectively based on the polymer dehalogenation and formamide chemistry for the preparation of heteroatom-doped carbon materials and atomically dispersed metal-nitrogen-carbon materials, and discovered many of them are highly efficient electrode materials for a variety of key electrocatalytic reactions (such as oxygen reduction reaction, oxygen evolution reaction, carbon dioxygen reduction, etc) and electrochemical energy storage (metal-air batteries, supercapacitor, etc).