Volatile organic compounds (VOCs) threaten human health and the ecological environment, requiring to be removed timely. Zeolite-templated carbon with and without sulfur (ZTC and S-doped ZTC) was prepared by the chemical vapor deposition (CVD) method in a rotating bed reactor and used to remove VOCs. ZTC samples showed narrow and ordered microporous structure (0–2 nm), high specific surface area (2049.05–1732.06 m2/g), abundant pore volume (1.28 – 1.16 cm3/g), and uniform sulfur distribution (S-doped ZTC). Afterwards, the VOCs adsorption capacity was tested at 30, 60, and 90 °C. The results showed that S-doped ZTC exhibited higher benzene (138.2 mg/g) and toluene (171.8 mg/g) adsorption capacities at 30 °C than those performed at 60 and 90 °C owing to the exothermic process. Moreover, S-doped ZTC showed better VOCs adsorption capacity than ZTC-RC due to the combination of physical and weak chemical adsorption. Subsequently, S-doped ZTC captured more toluene (171.8 mg/g) than benzene (138.2 mg/g) because of the dipole–dipole interaction. Furthermore, Fourier transform infrared spectrum (FTIR) and density functional theory (DFT) calculation revealed that inorganic components (NH3, NO, and SO2) imposed a negative effect on VOCs adsorption due to the comparative adsorption. This study offered insights into how ZTC structure and sulfur modification affected the adsorption of VOCs, providing a reliable guideline for the preparation and utilization of adsorbents used to remove VOCs.