Petrochemical resources are facing depletion and human long-term survival needs sustainable development. In this era, it is very important to develop new sustainable phase change materials (PCMs), because it has shown great application value in the effective utilization of industrial waste heat, solar energy harvesting, and electronic heat treatment. In this work, we reported a biomass phytic acid (PA) modified polyrotaxane (PLR) as PCMs for thermal management. The tensile performances, fire safety, phase transition performances of the PCMs were investigated. It is found that all the tensile properties, char residual, and fire-safety of PLR can be enhanced remarkably by introduce of PA. Typically, the Young's modulus, yielding strength and tensile strength of the PLR were 826.7 MPa, 14.2 MPa and 14.2 MPa, respectively, and significantly increased to 1527.4 MPa, 22.1 MPa, and 24.0 MPa respectively, with the addition of 10 wt% of PA. Elongation (>783 %) for all modified PCMs was gradually increased with the increase of PA contents. Thermal analysis shows that the fire safety of PLR is significantly improved. Specifically, for the best sample PLR-PA30, the pHRR could decrease by 54.2 %, THR decreased by 34.0 %; and the LOI increased from 20.8 % to 28.2 %. The PCMs showed the perfect form stability and leakage-proof performance, enhanced thermal conductivity and outstanding cycle properties. Notably, its biomass source, and high flexibility, enhanced fire safety and completely green pathway may provide a practical way for the highly flexible and sustainable packaging of electronic devices for heat treatment.