AbstractPolylactic acid (PLA) is a new type of biodegradable material that has been applied in many fields such as extrusion, injection molding, film drawing, and spinning. In contrary, it does not have flame retardancy. In this paper, N‐PCDL was synthesized by amidation reaction between COOH of PCDL and NH2 of tetraethylenepentamine (TEPA), followed by an Atherton‐Todd reaction of unreacted NH2 at the other end of TEPA with PH of DOPO to prepare a novel lignin‐based flame retardant containing nitrogen and phosphorus (NP‐PCDL). The Fourier transform infrared spectroscopy (FT‐IR) and nuclear magnetic hydrogen spectroscopy (1H NMR) analysis results showed that proton peaks of CONH, PN, and NH appeared in the NP‐PCDL spectrum, while the characteristic absorption peak of PH bond disappeared in DOPO, the X‐ray photoelectron spectroscopy (XPS) results showed that the degraded lignin consisted of elements C and O, while NP‐PCDL consisted of elements C, O, N and P. The above results indicated that NP‐PCDL was successfully prepared. NP‐PCDL accounted for 3% (mass percentage, the same below), 5% and 10% of PLA, then lignin based flame‐retardant PLA composites were prepared by internal mixing and injection molding. Thermogravimetric analysis (TGA) showed that the residual carbon of PLA/3% NP‐PCDL, PLA/5% NP‐PCDL and PLA/10% NP‐PCDL at 800°C were higher than that of pure PLA, with the increase of 56.56%, 97.54%, and 301.64%, respectively; The analysis of SEM, XPS, and Raman showed that PLA/NP‐PCDL formed dense, regular and highly graphitized residual carbon with phosphorus nitrogen structure during the combustion process. At the same time, NH3, H2O and PO˙ free radicals were released, which could dilute combustible gases, destroy free radical chain reaction, isolate combustible gases and heat, so as to play a flame‐retardant role.