According to first-principles calculations, the mechanical properties of Ta1-xHfxC (x = 0.2, 0.4, 0.5) improve as the Ta content increases due to enhanced bonding between Ta and C atoms. The negative mixing enthalpies indicate that all three solid solutions can be prepared as single-phase materials. Single-phase Ta1-xHfxC (x = 0.2,0.4,0.5) were prepared using Spark Plasma Sintering. Studies on oxidation reveal that Ta0.5Hf0.5C demonstrates the most superior oxidation resistance among the three compositions. During oxidation, forming a Ta2O5-Hf6Ta2O17 layer is essential for improving oxidation resistance. The research indicates that balancing the ratio of Ta and Hf is crucial for achieving optimal mechanical properties and oxidation resistance in practical applications.