A recent study on nanoporous carbon based materials (J. Am. Chem. Soc. 2012, 134, 2864) showed that the presence of abundant graphitized sp(2) carbon species in the frameworks led to higher affinity for aromatic hydrocarbons than their aliphatic analogues. Herein, improved understanding of the sensitive and selective detection of aromatic substances by using mesoporous carbon (MPC)-based materials, combined with a quartz crystal microbalance (QCM) sensor system, was obtained. MPCs were synthesized by direct carbonization of mesoporous polymers prepared from resol through a soft templating approach with Pluronic F127. The carbon-based frameworks can be graphitized through the addition of a cobalt source to the precursor solution, according to the catalytic activity of the cobalt nanoparticles formed during the carbonization process. From the Raman data, the degree of the graphitization was clearly increased by increasing the cobalt content and elevating the carbonization temperature. From a QCM study, it was proved that the highly graphitized MPCs exhibited a higher affinity for aromatic hydrocarbons than their aliphatic analogues. By increasing the degree of graphitization in the carbon-based pore walls, the MPCs showed both larger adsorption uptake and faster sensor response towards toxic benzene and toluene vapors.