Epoxy resins (EP) are widely used in building materials and daily life applications; however, their inherent flammability severely limits their broader use. In this study, a novel phosphorus/nitrogen (P/N) synergistic hydrogen-bonded organic framework (HOF) was successfully synthesized via a one-step self-assembly strategy using 4,4′-biphenylenebis(phosphonic acid) (BPA) and dimethylamine. Structural characterization confirmed both the chemical composition and crystalline nature of the material. When incorporated into the EP matrix, BPA-HOF significantly enhanced the flame retardancy, and notably, the mechanical properties were also improved at a 3 wt% loading. At a 9 wt% BPA-HOF content, the limiting oxygen index (LOI) increased to 27.7 %, and a V-1 rating was achieved in the UL-94 test. Meanwhile, the peak heat release rate (pHRR), total heat release (THR), and smoke production rate (SPR) decreased by 62.0 %, 44.8 %, and 51.7 %, respectively. Furthermore, the char residue of the EP composite increased from 7.0 % to 45.9 %, contributing to enhanced fire resistance. Mechanistic studies revealed that BPA-HOF inhibits flame propagation through gas-phase radical quenching and promotes char formation in the condensed phase. This work offers valuable insights into the rational design of efficient HOF-based flame retardants and represents a promising strategy for developing high-performance EP composites.