To investigate the effect of the distribution state of phosphophenanthrene groups within the branched structure on the flame retardant efficiency, the hyperbranched ester macromolecules Bz-DQMC-n (n = 1, 2, 3) capped with benzene rings were synthesized. The aggregation effect of phosphaphenanthrene groups in Bz-DQMC-n enhanced the flame retardancy of epoxy resins (EPs). At the same phosphorus contents of EPs, the Bz-DQMC-n/EP passed the V-0 rating, except for 2-(6-oxid-6H-dibenzo[c,e][1,2]oxaphosphorin-6-yl)-1,4-benzenediol (DOPO-HQ)/EP without aggregated phosphaphenanthrene groups, which only reached the V-1 rating in UL 94 test. The Bz-DQMC-2 showed a better flame inhibition effect. The limiting oxygen index (LOI) value of the Bz-DQMC-2/EP reached to 39.3%, and the peak heat release rate (pk-HRR) value was 563 kW/m2, which decreased by 62.5% compared to neat EP. In addition, the total heat release (THR), and average effective heat of combustion (av-EHC) values of EP with Bz-DQMC-2 were also lower than that with Bz-DQMC-1 and Bz-DQMC-3 in the cone calorimetry test. The mechanism demonstrated that the aggregated phosphophenanthrene groups and benzene rings in Bz-DQMC-2 jointly promoted the formation of high-quality residue with more aromatic structures. Meanwhile, the concentrated release feature caused by group aggregation slightly enhanced the quenching effect in the gas phase. The aggregation effect of phosphophenanthrene groups in specific structures provides guidance for the development of high-efficiency DOPO-based flame retardants.