The study reports the effect of some metal carbides (niobium carbide, vanadium carbide, titanium carbide, and manganese sulfide) on hydrogen embrittlement in the pipeline industry using plane wave’s density functional theory (DFT). Our results predicted that the interaction of hydrogen molecules with these metals carbide occurs in the long range with binding energy varying in the energy window [0.70eV to 0.043eV]. Also, our study shows the desorption of H2 molecules from these metal carbides in the chemisorptions. Since, hydrogen embrittlement, occurs in the atomic state of hydrogen, therefore our finding in the atomic interaction of hydrogen with NbC, VC, TiC, and MnS showed that the strength of the trapping of the hydrogen atom could be classified as: TiC+H>VC+H>NbC+H> MnS+H. In addition, our study reveals that the carbon site is the most favorable hydrogen trapping site than the metal one. Furthermore, our results demonstrate that increasing the layer can also be an efficient way to enhance the trapping capacity.