Due to the shortage of global petrochemical resources, preparing biodegradable polyurethane foam (PUF) with excellent strength and resistance against fire is an important way for sustainable development. A reactive all bio-based flame retardant CPE was prepared using chitosan (CS), phytic acid (PA), and epoxidized soybean oil (ESO) as raw materials. Meanwhile, the bio-based PUF matrix, named ERP, was prepared with ESO, ricinoleic acid (RA) and 4,4-diphenylmethane diisocyanate (PMDI). Thus, ERPC-EG foam with excellent performance was prepared by blending ERP, CPE flame retardant and expandable graphite (EG). The crosslinking of ESO with CS and PA effectively improved the hydrophobicity of CPE flame retardants. Furthermore, the LOI value of ERPC-EG foam is an exceptional 33.5 vol%. In addition, it attains V-0 classification in the UL-94 vertical combustion test, exhibiting excellent flame retardancy. Its peak heat release rate (pHRR) and total smoke release (TSP) during combustion are 99.42 kW/m