Six nanoporous carbons were prepared by a hard-template method using furfuryl alcohol (FA), 4,4′-bismaleimidediphenyl methane (BM), its copolymer with divinylbenzene (BM-DVB), and sucrose as carbon precursors, and two silica gels as templates. The influence of the templates and precursors on the properties of the synthesized porous carbons was studied. Other factors affecting the porous structure of the final products, such as surface activators and the final carbonization temperature, were also investigated. Results indicated that the specific surface areas and total pore volumes of the samples with micropores were in the range of 836–1785 m2·g−1 and 0.9–2.0 cm3·g−1, respectively. The highest surface area was obtained for the systems when sulphosalicylic or/and phosphoric acids were used as surface activators. The porous carbons were mesoporous when benzene vapor was present during carbonization under argon atmosphere. An increase in final carbonization temperature resulted in an increase in total pore volume. The influence of carbon precursors on the properties of nanoporous carbons was not that obvious. The presence of nitrogen atoms in the precursors (BM and BM-DVB) improved the thermal stability of the product.