Through addition reaction of Schiff‐base terephthalylidene‐bis‐(p‐aminophenol) (DP‐1) and diethyl phosphite (DEP), a novel phosphorus‐modified epoxy, 4,4'‐diglycidyl‐(terephthalylidene‐bis‐(p‐aminophenol))diphosphonate ether (EP‐2), was obtained. An modification reaction between EP‐2 and DP‐1 resulted in an epoxy compound, EP‐3, possessing both phosphonate groups and CN imine groups. The structure of EP‐2 was characterized by Fourier transform infrared (FTIR), elemental analysis (EA), 1H, 13C, and 31P NMR analyses. The thermal properties of phosphorus‐modified epoxies cured with 4,4'‐diaminodiphenylmethane (MDA) and 4,4'‐diaminodiphenyl ether (DDE) were studied by differential scanning calorimetry (DSC) and thermogravimetric analysis (TGA). The activation energies of dynamic thermal degradation (Ed) were calculated using Kissinger and Ozawa's methods. The thermal degradation mechanism was characterized using thermogravimetric analysis/infrared spectrometry (TG‐IR). In addition, the flame retardancy of phosphorus‐modified epoxy thermosets was evaluated using limiting oxygen index (LOI) and UL‐94 vertical test methods. Via an ingenious design, phosphonate groups were successfully introduced into the backbone of the epoxies; the flame retardancy of phosphorus‐modified epoxy thermosets was distinctly improved. Due to incorporation of CN imine group, the phosphorus‐modified epoxy thermosets exhibited high thermal stabilities; the values of glass‐transition temperatures (Tgs) were about 201–210°C, the values of Ed were about 220–490 kJ/mol and char yields at 700°C were 49–53% in nitrogen and 45–50% in air. These results showed an improvement in the thermal properties of phosphorus‐modified epoxy by the incorporation of CN imine groups. Copyright © 2010 John Wiley & Sons, Ltd.