Core–shell amorphous SiCx′Ny′Oz′@SiCxOy composite with composition gradient between core and shell was prepared by self-assembling from polysilazane and divinyl benzene with subsequent curing and pyrolysis. Both eddy-current-induced conduction loss and heterogeneous interface as well as defect-induced polarization loss in the composite contributed to the electromagnetic wave (EMW) energy consumption. Compared with SiCx′Ny′Oz′@SiCxOy composite with graphene oxide added ex situ, although the impedance match in air of sole SiCx′Ny′Oz′@SiCxOy composite was smaller, its larger attenuation constant consumed the incident EMW energy more and eventually entailed it the best EMW absorption property. Its effective absorption bandwidth (EAB) can reach as high as 4.96 GHz with a sample thickness of only 1.7 mm, recording the lowest thickness under the same EAB level in polymer-derived ceramics. What is more, the composite also had high thermal stability and good antioxidant property. It only had a weight loss of 2% in Ar and 22% in air heated until 1000 °C. The excellent EMW absorption property and the high stability at high temperatures enable the composite to be used as an efficient absorber in future harsh environments.