Abstract A series of thermally stable second-order nonlinear optical (NLO) polyimides has been synthesized. The polyimides were prepared by the ring-opening polyaddition of 4,4′-(hexafluoroisopropylidene) diphthalic anhydride and pyromellitic dianhydride with two aromatic diamines containing benzothiazole moiety as the NLO chromophore. The resulting polyimides had high number and weight-average molecular weights ( M n, M w) up to 28 500 and 78 600, respectively, and a large glass transition temperature of 260°C. Using in situ poling and temperature ramping technique, the optimal temperatures ( T opt) for corona poling were obtained to get the largest second-order NLO response. The electro-optical coefficient ( γ 33) of a polyimide at the wavelength of 830 nm was up to 22 pm/V after corona poling under its T opt, and the value remained well at elevated temperatures (retained >87% at 240°C for more than 120 h). The thermal stability of NLO polyimides was studied by the UV spectrometry after poling of the films.