Abstract To investigate the effects of oxygen‐containing functional groups on the adsorption of volatile organic compounds (VOCs) with different polarity, oxygen‐rich porous carbon materials (OPCs) were synthesized by heat treatment of glucose/potassium oxalate material. The carbon material had a large specific surface area (1697 m 2 g −1 ) and a high oxygen content (18.95 at.%). OPC exhibited high adsorption capacity of toluene (309 mg g −1 ) and methanol (447 mg g −1 ). The specific surface area and total pore volume determined the adsorption capacity of toluene and methanol at the high‐pressure range, while the oxygen‐containing groups became the main factor affecting the methanol adsorption at the low‐pressure range due to the hydrogen bond interaction through the density functional theory (DFT) calculations. This study provides an important hint for developing a novel O‐doped adsorbent for the VOCs adsorption applications and analyzing the role of oxygen‐containing groups in the VOCs adsorption under the low‐pressure range.