We studied the effects of the surface hydrogenation on the initial reaction processes of the transition-metal Ni and Ti adatoms on the Si(001) surface by the first-principles theoretical calculations. It was found that both Ni and Ti adsorbed on the bare Si surface are stabilized by penetrating into the subsurface sites, while they do not penetrate into the H-terminated Si subsurface. Their stability in the bare Si subsurface is due to the existence of the dangling-bond charge of the surface Si atoms. We concluded that the surface hydrogenation blocks the penetration of both Ni and Ti, thus preventing the silicidation. Furthermore, it is expected from our results that Ni and Ti in the bare Si subsurface are extracted onto the surface by the surface hydrogenation.