A resilient, flame-retardant and high-temperature resistant high-entropy carbonitride aerogel (HECNA), (Ti1/5Cr1/5Mo1/5Nb1/5Ta1/5)(C0.56N0.44), was successfully synthesized and thoroughly characterized. It exhibited a porosity of 93.9%, a compressive strength of 1.1 MPa and a remarkable stability at temperatures up to 1673 K, which, along with its outstanding fire-retardancy, and low thermal conductivity (as low as 0.149 W·m-1·K-1 at 298 K), made it a good candidate material for thermal insulation applications in demanding environments. Density functional theory (DFT) calculations indicate that the [N]/([C]+[N]) ratio in HECNA affects its lattice thermal conductivity, with a potential 83% reduction achievable by increasing the ratio from 0 to 1/2. This aligns with experimental findings, underscoring the substantial impact of elemental composition of HECNA on its thermal insulation performance.