A new polypyrrole derivative 4-(1H-pyrrol-1-yl) phenyl 4-(1H-pyrrol-1-yl) butanoate (NPB) was synthesized by chemical method and characterized by 1H and 13C NMR spectroscopy. A new copolymer based on NPB and 3,4-ethylenedioxythiophene(EDOT) was electrochemically synthesized. Cyclic voltammogram and spectroelectrochemical characterization showed that the copolymer film had a well-defined reversible redox process as well as electrochromic behavior. Moreover, the copolymer film exhibited a multicolor electrochromism at different potentials, fast switching time of 0.8 s at 365 nm and an optical contrast of 17% at 1100nm.