• The uniform electrochromic film was prepared by scraping. • This electrochromic film has flame-retardant properties. • The flexible electrochromic device fabricated with this film has good performance. Organic electrochromic materials and devices have been developed and successfully applied into smart windows, car anti-glare rearview mirrors, etc. However, the use of highly flammable materials to produce safety hazards is a big issue, which seriously hinders further application. Here, a novel organic electrochromic material with flame-retardant properties has been developed, and the effect of organophosphorus flame retardant in electrochromic property and flame retardant feature of the device were investigated systematically. More importantly, the device has good overall performance——reversibility (>20000 cycles), coloration efficiency (155 cm 2 /C), and transmittance change (66.6%). This promising flame-retardant electrochromic material will promote the development of organic ECDs in smart displays, electronic products, and camouflage.