The complex phase diagram and bonding nature of the TiAl system make it difficult to accurately describe its various properties and phases by traditional atomistic force fields. Here, we develop a machine learning interatomic potential with a deep neural network method for the TiAlNb ternary alloy based on a dataset built by first-principles calculations. The training set includes bulk elementary metals and intermetallic structures with slab and amorphous configurations. This potential is validated by comparing bulk properties-including lattice constant and elastic constants, surface energies, vacancy formation energies, and stacking fault energies-with their respective density functional theory values. Moreover, our potential could accurately predict the average formation energy and stacking fault energy of γ-TiAl doped with Nb. The tensile properties of γ-TiAl are simulated by our potential and verified by experiments. These results support the applicability of our potential under more practical conditions.