Periodic density functional theory calculations with plane-wave basis set and projector-augmented wave potentials have been carried out to investigate the stability and hydrogen interaction in the NaAlH(4)(001) surfaces doped with 3d transition-metal (TM) elements. A complex structure, TMAl(3)H(12), in which the TM atom occupies the interstitial position formed from three AlH(4)(-) groups, is the most stable structure for TM = Sc to Co. The stability of the complex structure, as well as the hydrogen desorption energies from different positions of the complex structure, was found to follow the 18-electron rule in general. The electron-deficient TMAl(3)H(x) tends to get more electrons by coordinating with the surrounding Al-H bonds and H-H bond, or by losing the "outside" hydrogen atoms. On the other hand, the electron-rich complex loses its excess electrons easily by releasing AlH(x), which resulted in the formation of a new catalytic center, or by desorbing H(2). By cycling between the electron-deficient and electron-rich states, TMAl(3)H(x) acted as an active center in reversible hydrogen release/uptake processes. Electronic structure analysis revealed that the electron transfer between hydrogen and Al groups mediated by the d orbitals of TMs played important roles in hydrogen release/uptake from alanate-based materials. The exchange of ligands can be described as a sigma-bond metathesis process catalyzed by transition metals through a dihydrogen complex. Early transition metals are more efficient to reduce hydrogen desorption energy and break H-H and Al-H bonds as a result of balanced electron-accepting/backdonating abilities, making them better candidates as catalysts. The present analyses are consistent with the experimental observations.