The emission of mercury from coal combustion has caused consequential hazards to the ecosystem. The key challenge to abating the mercury emission is to explore highly efficient adsorbents. Herein, sulfur-functionalized carbon (S-C) was synthesized by using a molten-salt pyrolysis strategy and employed for the removal of elemental mercury from coal-combustion flue gas. An ideal pore structure, which was favorable for the internal diffusion of the Hg0 molecule in carbon, was obtained by using a SiO2 hard template and adjusting the HF etching time. The as-prepared S-C with an HF etching time of 10 h possessed a saturation Hg0 adsorption capacity of 89.90 mg·g−1, far exceeding that of the commercial sulfur-loaded activated carbons (S/C). The S-C can be applied at a wide temperature range of 25–125 °C, far exceeding that of commercial S/C. The influence of flue gas components, such as SO2, NO, and H2O, on the Hg0 adsorption performance of S-C was insignificant, indicating a good applicability in real-world applications. The mechanism of the Hg0 removal by S-C was proposed, i.e., the reduced components, including sulfur thiophene, sulfoxide, and C-S, displayed a high affinity toward Hg0, which could guarantee the stable immobilization of Hg0 as HgS in the adsorbent. Thus, the molten-salt pyrolysis strategy has a broad prospect in the application of one-pot carbonization and functionalization sulfur-containing organic precursors as efficient adsorbents for Hg0.