Constructing a flame retardant insulation layer on the cell wall of opened-cell for polymer foam was the effective strategy to enhance its flame retardance. However, the closed-cell of rubber foam still faces a significant challenge to utilizing this strategy. Herein, a complex flame retardant system, including magnesium-aluminum layered double hydroxide (MgAl-LDH) and ammonium polyphosphate (APP), were densely and evenly distributed on the cell cavity-wall of closed-cell structure for styrene butadiene rubber/ethylene vinyl acetate (SBR/EVA) foam, which was realized via epoxy resin, 4, 4′-oxydibenzenesulfonohydrazide and azodicarbonamide based on the cell nucleation in the cavity at the melt-nucleator interface. The flame retardance of MgAl-LDH and APP distributed on the cell cavity-wall of SBR/EVA foam were larger than that distributed in the cell wall, which was ascribed to construct a flame retardant insulation layer that can delay the time to ignition, reducing initial peak of the heat release rate and forming a dense residue char layer after combustion. The mechanical properties of MgAl-LDH and APP distributed on the cell cavity-wall were the same tendency as the flame retardance, because this method avoids a commonly issue that the inorganic particles disperse in polymer matrix. This work will be favorable to design multifunctional polymer foams with well-balanced comprehensive performances, and expand their widespread applications.