The crystal structure of the delta-TiH2 sample was resolved and refined by single-crystal X-ray diffraction (SXRD). It has been found that it keeps stable even exposed to the air for 18 months by repeated SXRD measurements. In order to investigate its intrinsic atomic level movements, the diffusion properties of the H atoms in the delta as well as the epsilon phases of TiH2 have been studied by first-principles calculations. Firstly, the optimal hydrogen diffusion path in each phase was determined by comparing the diffusion barrier and diffusion coefficient of 4 and 5 possible paths for delta and epsilon phases, respectively. It was found that the hydrogen tends to diffuse on the (110) crystal plane from the initial tetrahedral interstitial site(T1) through the octahedral interstitial site(O1) to the nearest tetrahedral interstitial site(T1a) in the delta-TiH2, while tend to diffuse on the (100) crystal plane from the initial tetrahedral interstitial site(T1) through the tetrahedral interstitial site(T2) to the nearest tetrahedral interstitial site(T1a) in the epsilon-TiH2. The trend of the diffusion coefficient with temperature is consistent with the TG curve results of Ma et al. studying the thermal desorption of titanium hydride at different heating rates. Furthermore, the effect of the elemental substitution on the diffusion of hydrogen have been studied. According to the calculated diffusion barriers and diffusion coefficient, it was found that elemental substitution has similar effects on both phases. The doping of Cr elements promotes while the doping of Y, Hf and Sc prohibit the diffusion process comparing to pure TiH2, which can be understood by the Mulliken bond level. Except for Hf doping, the vacancy formation energy and diffusion barrier of Cr, Y, Sc doped and undoped have the same numerical growth trend, which satisfies Y > Sc > undoped > Cr. This seems to reflect the law about the effect of doped elements on the vacancy formation energy and diffusion barrier: the doping of some elements has the same effect on the growth trend of the vacancy formation energy and diffusion barrier. Finally, the effects of pressure of 0-2 GPa for the delta-TiH2 phase while 0-30 GPa for the epsilon-TiH2 phase have been investigated. The results suggest that applied pressure enhances the diffusion barrier and vacancy formation energy of the two phases of TiH2, and reduces the diffusion coefficient of H atoms, thus inhibiting the diffusion of H atoms.