A series of novel phosphorus‐containing polyesterimides were prepared from diols—a mixture of a new aromatic phosphorus‐containing bisphenol, namely 1,4‐bis[N‐(4‐hydroxyphenyl)phthalimidyl‐5‐carboxylate]‐2‐(6‐oxido‐6H‐dibenz<1,2>oxaphosphorin‐6‐yl)‐naphtalene, with aliphatic diols such as 1,3‐propanediol, 1,4‐butanediol, 1,5‐pentanediol, 1,6‐hexanediol, and 1,12‐dodecanediol—and an aromatic diacid chloride containing two preformed ester groups, namely terephthaloyl‐bis‐(4‐oxibenzoyl‐chloride), via high‐temperature polycondensation in o‐dichlorobenzene. The structures of monomers and polymers were verified by means of Fourier transform infrared (FTIR) spectroscopy and 1H NMR spectroscopy. The molar ratio of aromatic bisphenol to aliphatic diol was varied to generate a series of copolyesterimides with tailored physicochemical properties, structure–properties relationships being established. The effect of the phosphorus content on the thermal properties and the flame retardancy was evaluated by means of thermogravimetric analysis (TGA), TGA–FTIR, and scanning electron microscopy. The polymers were stable up to 340 °C showing a 5% weight loss in the range of 340–395 °C and a 10% weight loss in the range of 370–415 °C. The char yields at 700 °C were in the range of 13.6–38% increasing with the content of phosphorus‐containing bisphenol. The effect of the aliphatic content on the liquid crystalline behavior was investigated by polarized light microscopy, differential scanning calorimetry, and X‐ray diffraction. The transition temperatures from crystal to liquid crystalline melt were in the range of 209–308 °C. © 2010 Wiley Periodicals, Inc. J Polym Sci Part A: Polym Chem, 2010