In this study, p(AMPS) hydrogels are synthesized from 2-acrylamido-2-methyl-1-propansulfonic acid (AMPS) via a photo polymerization technique. The hydrogels are used as template for metal nanoparticles and magnetic ferrite nanoparticles. and also as a catalysis vessel in the generation of hydrogen from the hydrolysis of NaBH4. Approximately 5 nm Ru (0) and 20-30 nm magnetic ferrite particles are generated in situ inside this p(AMPS) hydrogel network and then used as a catalysis medium in hydrogen production by hydrolysis of sodium boron hydride in a basic medium. With an applied external magnetic field, the hydrogel reactor, containing Ru and ferrite magnetic particles, can be removed from the catalysis medium; providing on-demand generation of hydrogen. The effect of various parameters such as the initial concentration of NaBH4. the amount of catalyst and temperature on the hydrolysis reaction is evaluated. The activation energy for hydrogen production by Ru (0) nanoparticles is found to be 27.5 kJ mol(-1); while the activation enthalpy is 30.4 kJ mol(-1). The hydrogen generation rate in presence of 5 wt% NaOH and 50 mg p(AMPS)-Ru catalyst is 8.2 L H-2 min(-1) g Ru. (C) 2011 Elsevier B.V. All rights reserved.