The two-dimensional structures of transition metal nitride and carbide, TiN, and TiC have been alloyed with lithium (Li) in replacement of Ti, and their Li-ion applicability has been investigated using density functional theory and general gradient approximation. The alloy composition of x=0.125, 0.25, 0.375, and 0.5 have been considered and the stability of the alloys has been proved by cohesive energy and phonon density of states results. Moreover, the bond lengths between atoms as structural properties have been studied for these alloy structures. The largest peak of quantum capacitance and the largest negative value of surface storage charge are for alloy composition of TiC with x=0.125 with the values of 909.79 upmu F/cm^{2} and -,1819.58,upmu C/cm^{2}, respectively. Moreover, the results of the quantum capacitance and surface storage charge as a function of voltage for all Li alloy compounds are in the range of excellent supercapacitors and could have good potential to use as an electrode in the capacitor of Li-ion batteries. Furthermore, the electronic density of states of this group of alloys represents metallic behavior and therefore electrode material. In addition, the diffusion coefficient at temperatures of 77 and 300 K has been calculated using molecular dynamic calculations, and its lowest and largest values are 8times 10^{-8} cm^2/s (at 77 K) and 5.6times 10^{-7} cm^2/s (at 300), respectively. Plus, the largest value of electrical conductivity per relaxation time at 300 K belongs to Li_{0.25}Ti_{0.75}C with a value of 9.8times 10^{19}/(Omega m s).