Electroactive poly(amic acid), with oligoaniline in the main chain, was synthesized from macro-monomer of oligoaniline and p-phenylenediamine by oxidative coupling polymerization. The polymer characterization included Fourier-transform infrared spectra (FTIR), 1 H nuclear magnetic resonance spectra ( 1 H NMR) and gel permeation chromatography (GPC) as a determination of polymer structure, spectral analysis of different oxidation states via UV–visible spectra. Then the obtained poly(amic acid) was heated at 260 °C to induce cyclization, and transformed into polyimide materials. X-ray powder diffraction (XRD) and thermogravimetric analysis (TGA) were used for the characterization of poly(amic acid) and polyimide materials. Moreover, poly(amic acid) and polyimide were tested in 1.0 M H 2 SO 4 aqueous solution by cyclic voltammetry and they showed different electrochemical activity from each other. The prepared poly(amic acid) and polyimide doped with HCl exhibit a large enhancement in the dielectric constant in comparison to that of traditional polymers, ascribed to the improvement in charge delocalization of the polymers by introduction of the conjugated oligoaniline segments.