Two functionalized second-order nonlinear optical polyimides were synthesized by the polycondensation reaction between chromophore-containing dianhydride and diamine monomer. The molecular weights of the final polymers were determined to be M(n)=10000-11800. No melting was detected and they showed relatively low glass transition temperature at 160.7 degrees C and 180.7 degrees C due to ether linkage in the polymer backbone. In the case of PI2-DANS, high optical quality films were prepared by spin casting. The second harmonic generation coefficients, d(33) and d(31) of PI2-DANS were measured to be 24 and 4.8 pm/V respectively. They exhibited no decay until ca. 100 degrees C.