It was an enormous challenge to endow flame retardant for epoxy resin (EP) with high efficiency, high compatibility, low addition and environmental protection. Herein, a bio‐based flame retardant (PHAO) was synthesized using protocatechualdehyde, p‐aminobenzonitrile, and 9,10‐dihydro‐9‐oxa‐10‐phospha‐phenanthrene‐10‐oxide (DOPO) as precursors via a facile approach. PHAO was applied to EP to prepare EP/PHAO composites. Furthermore, PHAO demonstrated outstanding compatibility with the EP matrix, the interface free energy (IFE) value among PHAO and EP was 0.9 mJ/m2. For EP/3PHAO, the tensile strength enhanced from 55.4 MPa of pure EP to 67.4 MPa. EP/5PHAO, obtained by adding 5 wt% PHAO into EP, had a phosphorus content of only 0.34%, reaching the V‐0 level in UL‐94 test, and the limiting oxygen index was 32.5%. In comparison to pure EP, the peak heat release rate, total heat release and total smoke production of EP/5PHAO declined by 25.5%, 15.4%, and 15.3%, respectively. The flame retardancy of EP/5PHAO in gaseous and condensed phases was confirmed by investigating the residual carbon and pyrolysis behavior of EP/5PHAO. The synthesis of PHAO offered a solution for designing bio‐based flame retardant and advancing the flame retardancy and mechanical properties of EP.