In this work, nanoporous carbons (NPCs) were prepared by the self-assembly of polymeric carbon precursors and block copolymer template in the presence of tetraethyl orthosilicate and colloidal silica. The NPCs' pore structures and total pore volumes were analyzed by reference to N2/77 K adsorption isotherms. The porosity and elemental mercury adsorption of NPCs were increased by activation with carbon dioxide. It could be resulted that elemental mercury adsorption ability of NPCs depended on their specific surface area and micropore fraction.