This article presents the synthesis of nonlinear optical responsive chromophores by adopting a green chemistry approach by coupling N‐methyl‐N‐(2‐hydroxyethyl)‐4‐amino benzaldehyde with barbituric acid, 1,3‐indanedione, and 1,3‐diethyl‐2‐thiobarbituric acid as the acceptors through stilbene linkage. We performed the synthesis in less than 10 minutes at room temperature with water as a solvent without catalyst. Two different side‐chain polyimides were synthesized from poly(hydroxy‐imide)s with chromophores by Mitsunobu reaction. The chromophores were characterized by Fourier transform infrared, 1H NMR, 13C NMR, and elemental analysis. However, the polyimides were characterized by Fourier transform infrared and 1H NMR. The inherent viscosities (ηinh) of polyimides were determined by Ubbelohde viscometer, which ranged between 0.1793 and 0.1890 dL/g. The molecular weights of the polyimides were determined using gel permeation chromatography and were in range of 23 000 to 26 000. Polyimides demonstrated an excellent solubility in polar aprotic solvents, indicating good processability. Thermal behavior of these polyimides was studied by differential scanning calorimetry and thermogravimetric analysis. The Tg's were in the range of 185°C to 255°C. The change in the molecular orientation in the polymer films after electrical poling was ascertained using ultraviolet‐visible spectrophotometer and atomic force microscopy. The thicknesses and refractive indices of the thin films were determined by an ellipsometer. The second harmonic generation coefficients of the corona‐poled polymer films at Topt's, determined by the Maker fringe technique, ranged between 59.33 and 77.82 pm/V. High thermal endurance observed for the polyimides is attributed to the extensive hydrogen bonds in the matrix. The developed polyimides showed no decay in second harmonic generation signals below 110°C, indicating the acceptance for nonlinear optical devices.