Ultra-high-temperature ceramics have many applications in aerospace and other extreme environments owing to their excellent resistance and oxidation at high temperatures. In this study, an HfC precursor was first synthesised in a simple process using HfCl4, acetylacetone, and 1- and 4-butanediol as the raw materials. To improve mechanical and antioxidation properties of single HfC ceramic, an HfC-SiC precursor (PHCS) was successfully prepared by reacting PHCO with a liquid SiC precursor. The composition, structure, and properties of the synthesised precursors and their pyrolysis products were characterised using elemental analysis, infrared spectroscopy, thermogravimetry, X-ray diffraction, scanning electron microscopy, and transmission electron microscopy. PHCO, with a ceramic yield of 60.5 wt% at temperatures up to 1000 degrees C, mainly contained C, O, and Hf. Owing to its Hf-O bonds and low C content, PHCO transformed into HfC and HfO2 after treatment at 1600 degrees C. Moreover, the PHCS prepared by the copolycondensation of PHCO and the liquid SiC precursor had good solubility in n-butanol and exhibited a high ceramic yield (77.8 wt%). The synthesised ceramic derived from PHCS comprised HfC and SiC, with contents of 76.47 and 20.75 wt%, respectively. Good solubility, high ceramic yield, and ceramic contents make the PHCS precursor an ideal raw material for the fabrication of ultra-high-temperature ceramics.