ABSTRACTPoly(N‐methylpyrrole) (PNMPy), poly(N‐methylpyrrole‐TiO2) (PNMPy‐TiO2), and poly (N‐methylpyrrole‐ZnO) (PNMPy‐ZnO) nanocomposites were synthesized by in situ electropolymerization for cathode active material of lithium secondary batteries. The charge–discharging behavior of a Li/LiClO4/PNMPy battery was studied and compared with Li/LiClO4/PNMPy‐nanocomposite batteries. The nanocomposites and PNMPy films were characterized by cyclic voltammetry, in situ resistivity measurements, in situ UV–visible, and Fourier transform infra‐red (FTIR) spectroscopy, scanning electron microscopy (SEM), and transmission electron microscopy (TEM). The differences between redox couples (ΔE) were obtained for polymer nanocomposites and PNMPy films. During redox scan, a negative shift of potential was observed for polymer nanocomposite films. Significant differences from in situ resistivity of nanocomposites and PNMPy films were obtained. The in situ UV–visible spectra for PNMPy and polymer nanocomposite films show the intermediate spectroscopic behavior between polymer nanocomposites and PNMPy films. The FTIR peaks of polymer nanocomposite films were found to shift to higher wavelengths in PNMPy films. The SEM and TEM micrographs of nanocomposite films show the presence of nanoparticle in PNMPy backbone clearly. The result suggests that the inorganic semiconductor particles were incorporated in organic conducting PNMPy, which consequently modifies the properties and morphology of the film significantly. © 2014 Wiley Periodicals, Inc. J. Appl. Polym. Sci. 2015, 132, 41526.