Nonlinear optical (NLO) functionalized polyimides were directly synthesized using the nitro-displacement reaction between an alkanediol monomer and a diimide monomer without a thermal curing step. The polyimides were soluble in aprotic polar solvents such as DMSO, DMAc, DMF and NMP, and showed glass transitions at temperatures between 172 and 198 Degrees C. We observed good thermal stability up to around 300 Degrees C (at 5% weight loss) for the polymers. The weight average molecular weights of the resulting polymers were determined to be 10400-15100 (Mw/Mn = 1.84-2.00). The poled polymer films showed good nonlinearity(d33 = 76 pm V-1) in the Maker fringe method for the second harmonic generation (SHG).