We systematic investigated the influence of substitution of Hf and Zr atoms for Ta atoms in TaC using first-principles supercell (SC) method and virtual crystal approximation (VCA) methods, including the impurity formation energy, lattice constant, volume, elastic constants, elastic moduli, melting points, fracture toughness and density of states of the Ta 1-x Hfx C and Ta1-x Zrx C ceramics in the whole range of content 0≤ x ≤1. Our calculated results show that the stability of Ta 1-x Hf x C and Ta 1-x Zrx C increases with the increase of Hf and Zr content, and Ta1-x Zrx C is more stable than Ta1-x Hfx C at the same content of Hf and Zr. The lattice constants and volumes dilate with the increase of Hf and Zr content. Furthermore, Ta1-x Hfx C and Ta1-x Zrx C carbides are mechanically stable and brittle. The bulk modulus of Ta1-x Hfx C and Ta1-x Zrx C decreases with the increasing content of Hf and Zr. Moreover, the hardness, fracture toughness, and melting point of Ta1-x Hf x C and Ta1-x Zrx C solid solutions have the peak. In particular, Ta0.8Hf0.2C has the highest hardness, largest fracture toughness and highest melting temperature.