With the increase in the depth of coal mining, the problem of coal spontaneous combustion due to air leakage in the coal mine roadways is becoming increasingly serious. However, traditional cement mortar spray coatings are prone to cracking and poor flexibility, and polyurethane type spray coatings are not flame retardant, they are unable to meet the spraying needs. This paper proposes the preparation of a cement-based flexible spray coating for flame retardant (CFSCF) by modifying the cement-based material with the addition of fly ash, cellulose and emulsion material. The initial dosage ranges of fly ash, cellulose and emulsion material were studied. The effects of different dosages of fly ash, cellulose and emulsion material on the 7-day tensile strength, 14-day tensile strength and 28-day tensile strength were studied, and the optimum ratio of CFSCF was determined by the response surface methodology. The tensile mechanical properties, micromorphology and flame retardant properties of CFSCF with the optimum ratio were studied. The results showed that: the tensile strength of CFSCF reached the maximum at 28 days of maintenance period, 2.55 MPa; the maximum elongation at break was 52.62% at 14 days; the tensile toughness was up to 833.05KJ m−3; when the material was pulled, the two walls of the crack would bond to each other, reflecting the excellent flexibility; the alcohol lamp burning test results showed that there is flame burning time of 0 s, the material leaves the flame extinguished, has good flame retardant properties.