Adsorption, absorption and desorption energies and other properties of hydrogen storage in palladium and in the metal hydrides AlH, MgH, Mg(BH), Mg(BH)(NH) and LiNH were analyzed. The DFT calculations on cluster models show that, at a low concentration, the hydrogen atom remains adsorbed in a stable state near the palladium surface. By increasing the hydrogen concentration, the tetrahedral and the octahedral sites are sequentially occupied. In the α phase the tetrahedral site releases hydrogen more easily than at the octahedral sites, but the opposite occurs in the β phase. Among the hydrides, Mg(BH) shows the highest values for both absorption and desorption energies. The absorption energy of LiNH is higher than that of the palladium, but its desorption energy is too high, a recurrent problem of the materials that have been considered for hydrogen storage. The release of hydrogen, however, can be favored by using transition metals in the material structure, as demonstrated here by doping MgH with 3d and 4d-transition metals to reduce the hydrogen atomic charge and the desorption energy.