Second‐order nonlinear optical copolyimides were prepared from a novel chromophore‐containing diamine, 4‐nitro‐4′‐[N‐(4,6‐di‐4‐aminophenylamino)‐1,3,5‐triazin‐2‐yl]aminoazobenzene, a codiamine, 4,4′‐diamino‐3,3′‐dimethyldiphenylmethane, and benzophenone‐3,3′,4,4′‐tetracarboxylic dianhydride by a traditional two‐step process, which includes a solution polycondensation followed by a chemical imidization. Some of the polyimides (PIs) obtained possessed direct photolithographic features, and good photolithographic patterns were easily obtained. All PIs exhibited high‐glass transition temperatures (235–246 °C) and high thermal‐decomposition temperatures. They were also soluble in strong polar aprotic solvents such as N‐methyl‐2‐pyrrolidone, dimethylacetamide, dimethylformamide, dimethyl sulfoxide, and γ‐butyrolactone. © 2001 John Wiley & Sons, Inc. J Polym Sci A: Polym Chem 39: 1419–1425, 2001