Lightweight, flexible and highly conductive electromagnetic interference (EMI) shielding materials are of great importance for protecting flexible electronics and telecommunication devices under extremely high temperature conditions. A potential solution is to incorporate ceramic phases with highly conductive flexible carbon nanotube films to improve their thermal stability. However, the grain size of the ceramic phase generally increased significantly as the temperature increased which led to brittleness. In this work, a highly flexible carbon nanotube (CNT) film with controllable ceramic nanocrystals was prepared by precursor infiltration and pyrolysis. The silicon carbide (SiC) grain size in the nanocomposites was inhibited by the spatial confinement effects of CNT networks and a second amorphous SiBCN phase. The SiC grain size in the composite film decreased with the increase of the SiBCN content and the elongation at break of the nanocomposites improved significantly by 45 %. Moreover, the initial thermogravimetric temperature of the prepared films has been significantly improved to exceed 600 °C compared to the raw CNT film. Importantly, the nanocomposite film exhibited an average EMI shielding effectiveness of ∼40 dB from 8.2 to 12.4 GHz. Benefiting from the ultrafine grain size, the nanocomposite films could be folded and extended without micro-cracks over 1000 times. Combining the performance and mechanical properties of the nanocomposite film, this approach provides important guidance for designing high-performance CNT-based electromagnetic shielding materials with superior flexibility at elevated temperatures.