Substituted and nonsubstituted aniline oligomers were theoretically investigated. Aniline oligomers with a dicyanoethenyl acceptor group attached at a terminal site of each known structure (emeraldine, pernigraniline, and leucoemeraldine forms), contributing to obtain large first hyperpolarizabilities. The effect of oligomer size on the nonlinear responses was also investigated by considering oligomers with different chain length (tetramers and octamers). The magnitudes of  calculated for the functionalized and nonfunctionalized octamers were larger than for the tetramers and their substituted oligomers. The substituted pernigraniline octamer presented the largest  value among the investigated aniline oligomers. The results of the AM1/TDHF calculations suggest that these aniline-based materials can be good candidates for second-order nonlinear optical materials.