It is particularly important to develop new materials with both thermal insulation and flame retardant properties for addressing the severe issues caused by fire accidents. Herein, a kind of conjugated microporous polymer nanospheres with hollow structure (HCMPNS) was synthesized by Sonogashira-Hagihara cross-coupling reaction using SiO2 nanospheres as hard template and 1,3,5-triacetylenebenzene, as alkynyl monomer. Then, HCMPNS was chemically graft-modified with azidotrimethylsilane (TMSA) by "click" chemistry (HCMPNS-FRSi), and the HCMPNS-FRSi obtained from the reaction was introduced into flammable epoxy resin (EP) to obtain EP based composites, i.e. EP-Ⅰ and EP-Ⅱ. The thermal conductivities were found to be 0.0341 W m−1 K−1 and 0.0268 W m−1 K−1 for EP-Ⅰ and EP-Ⅱ, respectively, showing excellent thermal insulation performance. The total heat release (THR), the total smoke production (TSP) and the peak CO2 produced (CO2P) of EP-Ⅰ were reduced by 18.0 %, 8.0 %, 14.3 % compared with pure EP as measured by cone calorimetry (CC), respectively, indicating a certain extent flame retardant effect. In order to further improve its flame retardant properties, phosphoric acid containing the flame retardant phosphorus element was added to HCMPNS-FRSi (HCMPNS-FRSi-P), followed by the introduction of the resulting HCMPNS-FRSi-P into EP matrix to form EP based composites with Si and P dual incorporation (EP-III and EP-IV), with the thermal conductivities of 0.0470 W m−1 K−1 and 0.0855 W m−1 K−1, respectively. Through the cone calorimetry (CC) of EP-III, EP-IV, total heat release (THR) were reduced by 17.0 %, 23.8 %, total smoke production (TSP) were reduced by 6.2 %, 7.2 %, respectively. The peak heat release rate (HRR) and the peak CO2 produced (CO2P) of EP-Ⅳ were reduced by 16 % and 25 %, respectively, compared with pure EP. It has good thermal insulation and flame retardant effect. Therefore, HCMPNS-FRSi-P, as a new type of flame retardant material, has great potential in the fields of electronics, construction, transportation and so on.