Nanocellulose, a biomass resource known for its abundance, renewability, environmental friendliness, and nanoscale size, has garnered significant interest from researchers. However, it is a type of carbohydrate that burns very easily, which limits its applications, especially in areas where good thermal stability and low flammability are requested. In this study, phosphorylated cellulose fibers (P-CF) was prepared via ternary choline chloride/urea/ phosphorous acid reactive deep eutectic solvent (RDES) pretreatment. The influences of different conditions (reaction temperature, time, mass ratio of cellulose to RDES and molar ratio of choline chloride/urea/ phosphorous acid) on the charge density and yield of P-CF were studied. Phosphorylated cellulose nanofibrils (P-CNF) with an average width of 5.1 ± 0.2 nm were obtained after subsequential ultrasonication. The peak heat release rate of P-CNF was reduced by 89.1 % compared with unmodified softwood pulp, and the limiting oxygen index value increased to 44.8 %. Furthermore, the fabricated P-CNF based film demonstrated good self-extinguishing behavior in both horizontal and vertical combustion tests, high transparency (visible-light transmittance above 80 %) and robust mechanical properties. This developed RDES system provided a new and sustainable route to prepare intrinsically flame-retardant nanocellulose, which may have potential applications in many fields such as thermal insulation, and electronics.