An IR electrochromic film constructed by copolymer of aniline and o‐nitroaniline has been successfully prepared by cyclic voltammetry. The effects of polymerization of aniline and o‐nitroaniline on electrochromic properties and optical properties were investigated by cyclic voltammetry, scanning electron microscopy, FTIR spectrometer, and UV–vis spectrophotometer. The results indicate that the film can exhibit three colors (apple green, dark green, and dark blue) at different voltages of −0.1, 0, and 0.8 V. Simultaneously, a fast response time (1.89 and 4.47 s), a high coloration efficiency, a significant optical modulation (60% between −0.1 and 0.8 V) and a large average emissivity range (Δεmax = 0.203) are achieved for the new film. © 2018 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2019, 136, 47290.