The development of functional materials with better flame-retardant and thermal insulation properties has attracted considerable attention for energy storage applications in modern society. Here, we describe a facile approach for the preparation of conjugated microporous polymer hollow spheres (CMP-HSs) by using SiO2 nanoparticles as a template via the Sonogashira-Hagihara cross-coupling reaction. The as-synthesized CMP-HSs have good thermal stability with a thermal decomposition temperature of up to 281 °C, high porosity (the BET specific surface area is measured to be approximately 666 m2 g−1) along with lipophilic and hydrophobic characteristics. To further improve their flame retardancy, CMP-HSs were treated with dimethyl phosphonate (DMMP) though an immersion method to prepare the CMP-HSs composite (CMP-HSs-DMMP) flame-retardants. By introducing CMP-HSs-DMMP into the epoxy resin (EP) matrix, the as-prepared EP composites showed excellent flame-retardant properties, e.g., the peak heat release rate (pHRR) and total heat release (THR) value of EP composites containing only 0.2% CMP-HSs-DMMP flame-retardant were 650.9 kW m−2 and 79.4 MJ m−2 respectively, in the range of 0 °C − 650 °C, which are 19.6 ± 2% and 19.1 ± 5% lower than that of pure EP within the same temperature range. Considering the significant enhancement of its flame retardancy with only a slight dosage of CMP-HSs-DMMP, such CMP hollow sphere-based flame-retardant composites may have great potential as functional bulk materials or coatings in a variety of fireproofing applications.