Topological semimetal may have potential applications like topological qubits, spintronics and quantum computations. Efficient heat dissipation is a key factor for the reliability and stability of topological semimetal-based nano-electronics devices, which is closely related to high thermal conductivity. In this work, the elastic properties and lattice thermal conductivity of TaN are investigated by first-principles calculations and the linearized phonon Boltzmann equation within the single-mode relaxation time approximation (RTA). According to the calculated bulk modulus, shear modulus and $C_{44}$, TaN can be regarded as a potential incompressible and hard material. The room-temperature lattice thermal conductivity is predicted to be 838.62 $mathrm{W m^{-1} K^{-1}}$ along a axis and 1080.40 $mathrm{W m^{-1} K^{-1}}$ along c axis, showing very strong anisotropy. It is found that the lattice thermal conductivity of TaN is several tens of times higher than one of other topological semimetal, such as TaAs, MoP and ZrTe, which is due to very longer phonon lifetimes for TaN than other topological semimetal. The very different atomic masses of Ta and N atoms lead to a very large acoustic-optical band gap, and then prohibits the scattering between acoustic and optical phonon modes, which gives rise to very long phonon lifetimes. Based on mass difference factor, the WC and WN can be regarded as potential candidates with ultrahigh lattice thermal conductivity. Calculated results show that isotope scattering has little effect on lattice thermal conductivity, and that phonon with mean free path(MFP) larger than 20 (80) $mathrm{mu m}$ at 300 K has little contribution to the total lattice thermal conductivity. This work implies that TaN-based nano-electronics devices may be more stable and reliable due to efficient heat dissipation.