Cotton fabric is widely used in many occasions, but it is flammable with high fire risk. To meet the great fire safety demands of cotton fabric, a novel lignocellulosic-based P-N synergistic (LFPN) flame-retardant coating with high efficiency and environment friendly was developed via mechanochemistry strategy in the aqueous phase. The characterisation results showed the stable P-O-C bond formed to bind both lignocellulosic fibre and ammonium polyphosphate (APP). Meanwhile, LFPN has an excellent dispersion in water with a nanometer-scale enveloping rod structure. The cotton fabric treated by the LFPN coating showed outstanding flame-retardant properties, the peak heat release rate (PHRR) was reduced by 77% and the residue mass was increased by 259% compared with control cotton fabric. And there was a self-extinction phenomenon during the flammability test of flame retardant cotton. Based on the analysis of the combustion and pyrolysis process, a gas-condensed two-phase flame retardant mechanism model was proposed, which could be used to explain the action process of LFPN for cotton fabric during combustion.