We present a theoretical analysis and interpretation of the x-ray absorption near-edge structure of x-ray absorption spectroscopy (XAS) at the titanium $K$-edge of several Ti compounds for understanding catalysis mechanism in lithium amide ${\text{LiNH}}_{2}$ and imide ${\text{Li}}_{2}\text{NH}$ systems for hydrogen storage. Our theoretical approach is based on first-principles calculations using all-electron full-potential linear augmented plane-wave method. Chemical bonding and local geometry of catalytically-active Ti states in the hydrogen desorption reaction ${\text{LiNH}}_{2}+\text{LiH}\ensuremath{\rightarrow}{\text{Li}}_{2}\text{NH}+{\text{H}}_{2}$ are investigated. It is found that XAS spectra of some compounds consisting of elements Li, N, H, and Ti are quite similar to measured ones of catalytically-active Ti compounds. We conclude that Ti ions may occupy the Li sites in ${\text{LiNH}}_{2}$ during the reaction.