Using density functional theory and finite field method, nonlinear-optical properties of nine triarylamine-α-cyanocinnamic acid molecules was calculated at the theoretical level of M06-2X/6-311++G(d,p) and WB97XD/6-311++G(d,p). Except for (E)-2-cyano-3-(4-(di([1,1'-biphenyl]-4-yl)amino)phenyl)acrylic acid (a) which is D-p-A electronic structure, the remaining eight derivative molecules are all A-p-D-p-A structures. The calculation result showed that the lowest energy transition of the nine triarylamine derivatives molecules was the p–p* electron transition from HOMO to LUMO. Compared with those of the gas phase, the maximum absorption wavelengths of the molecules in ethanol solution exhibited a certain degree of redshift. The introduction of conjugated carbon-carbon double bonds or carbon-carbon triple bonds between the biphenyl structure of molecule a has little effect on the second-order nonlinear-optical properties of the molecules. However, the introduction of carbon-carbon double bonds into the parent molecules improves the third-order nonlinear-optical properties. The introduction of a heterocyclic ring (furan ring or thiophene ring) between the cyano-cinnamic acid group branch and the triarylamine enhances the second-order and third-order nonlinear-optical properties, especially the second-order and third-order polarisability of the b3 and c3 molecules obtained by introducing a thiophene ring; these molecules had the highest polarisability values. The second- and third-order polarizabilities of the b3 molecule are 0.13×105 a.u. and 27.13×105 a.u., respectively, and the second- and third-order polarizabilities of the c3 molecule are 0.14×105 a.u. and 28.10×105 a.u., respectively. This suggests that the b3 and c3 molecules have beneficial second- and third-order nonlinear-optical properties, and can be used as the basis for the design of good second- and third-order nonlinear-optical materials.