The reversible reactions involving formate and bicarbonate can be used to store and release hydrogen (H 2), allowing H 2 to serve as an effective energy carrier in energy systems such as fuel cells. However, to feasibly utilize these reactions for renewable energy applications, efficient catalysts that can reversibly promote both reactions are required. Herein we report the synthesis of novel polyaniline (PANI)derived mesoporous carbon-supported Pd nanoparticles, or materials that can efficiently catalyze these reversible reactions. The synthesis involves pyrolysis of PANI/colloidal silica composite materials at temperatures above 500 °C and then removal of the colloidal silica from the carbonized products with an alkaline solution. The resulting nanomaterials efficiently catalyze the reversible reactions, i.e., the dehydrogenation of formate (HCO 2 ‾ + H 2 O H 2 + HCO 3 ‾) and the hydrogenation of bicarbonate (H 2 + HCO 3 ‾ H 2 O + HCO 2 ‾). The porosity and the catalytic property of the materials can be tailored, or improved, by changing the synthetic conditions (in particular, the pyrolysis temperature and the amount of colloidal silica used for making the materials). The study further reveals that having an optimum density of N dopant species in the catalysts makes Pd to exhibit high catalytic activity toward both reactions. Among the different materials studied here, the one synthesized at 800 °C with relatively high amount of colloidal silica templates gives the best catalytic activity, with a turnover frequency (TOF) of 2,562 h-1 for the dehydrogenation reaction and a turnover number (TON) of 1,625 for the hydrogenation reaction. These TOF and TON values are currently among the highest values reported for heterogeneous catalysts for these reversible reactions.