Building energy saving is directly related to resource utilization optimization and residential comfort, which is important for the environment and production. At present, building energy saving is developing towards green, recyclable, and low-risk directions. Phase change materials, as effective energy storage materials, can pollution-freely regulate room temperature. Regarding the leakage, phase change materials are encapsulated into microcapsules. However, the flammability and slow thermal response of phase change material microcapsules hinder their application in building materials. Herein, novel double-layered phase change material microcapsules (D-MPCMs), with the inner poly melamine tetramethylene phosphonium sulfate (PMTMPS) shell layers and outer polydopamine (PDA) shell layers, are prepared by in-situ polymerization method, which are filled into epoxy resin (EP) coatings. This study is the first to use cross-linked flame retardants as the shells of microcapsules. The outer PDA shell layer improves the flame retardancy of microcapsules while overcoming the problem of slow thermal response rate. Thermogravimetric analysis and differential scanning calorimeter tests are considered to explore the thermal stabilities and properties of the resultant microcapsules. Results demonstrate that D-MPCMs have a residual mass of 10.8 % more at 600 ℃ and a faster thermal response rate. The study shows that the addition of the PDA shell layers not only reduces the total heat release from 64.29 MJ/m2 to 45.01 MJ/m2 but also enhances the solar thermal conversion performance which gives potential in the process solar energy storage design and fire safety design in actual building application of epoxy resin coatings.