Four nanoporous carbons have been synthesized by using similar silica template method. The structural characterizations showed that the carbons retained ordered hexagonal or cubic pore structure expect for disordered CS41, which was prepared using MCM-41 as template. Nitrogen adsorptions at 77 K revealed that carbons with different pore size distribution, specific surface area and pore volume were obtained. The hydrogen adsorption capacity was measured by volumetric method, and the most promising candidate resulted to be microporous carbon CS41, which exhibited the highest H2 uptake of 1.17 wt % at 77 K and 1 bar. The capacities of hydrogen adsorbed in the nanoporous carbons were correlated with specific surface area and microporous volume. The result demonstrated that the H2 uptake in the carbons had essential relationship with volume of pores smaller than 1 nm.