Chemical reactions involve competing pathways. Here, two pathways for H desorption from MgH2 are identified by first-principles calculations: One involves H diffusion in bulk Mg, while the other involves H vacancy diffusion at the MgH2 surface. The latter is sensitive to the size of the reactant MgH2 and self-terminates in bulk material as dehydrogenation eventually eliminates exposed MgH2. However, this surface vacancy pathway can maximize the catalyst effect of Pd by decoupling the kinetics of H desorption from that of H diffusion. When the surface-to-bulk ratio is large as in the case of MgH2 nanostructures, H desorption will take place primarily via the low-barrier surface vacancy pathway. Our picture attributes the experimentally observed size effect of MgH2 on H desorption, beyond the quantum size regime, to a synergy between the nanosize of the reactant and the catalyst.