A new nanoporous polypyrrole material with permanent mesopores on the surface, internal pores, and pockets with sponge-like structures has been developed. The nanoporous polypyrrole was prepared as a material for hydrogen storage using a simple, environmentally friendly, and newly developed ‘solid-state vapor-phase polymerization’ method. The direct use of the solid powder of oxidant in the new preparation method is responsible for the pore formation mechanism, and preparation method also controls the pore diameter of the prepared nanoporous conducting polymer. The effect of reaction time on the pore volume and hydrogen storage capacity was investigated, and it was found that the hydrogen storage capacity and the mesopore volume decreased based on an increase in reaction time. The prepared nanoporous polypyrrole materials have been observed to reach a maximum reversible hydrogen adsorption capacity of 2.2 wt.% at 77 K. The average isosteric heat of adsorption of the obtained polypyrrole was 7.51 kJ/mol, which is larger than that reported for most metal-organic frameworks, porous carbon, and hypercross-linked polystyrenes. Copyright © 2013 John Wiley & Sons, Ltd.