Pyrrole and methyl anthranilate were copolymerized in different molar ratios in the presence of, H2O2, and FeSO4 at ambient temperature and pressure to obtain efficient conducting copolymers, Ppy‐MA. These conducting copolymers, Ppy‐MA, were in situ reacted with silver nanoparticles to generate nanocomposites, Ag@Ppy‐MA, which exhibit enhanced electrical conductivity. The spectra and morphology of different copolymers, Ppy‐MA, and their nanocomposites, Ag@Ppy‐MA, were analyzed using Fourier transform infrared, SEM, tunneling electron microscopy, X‐ray diffraction, thermogravimetric analysis, and differential thermal analysis. These studies have shown that the nanocomposites, Ag@Ppy‐MA, are thermally more stable and good electrical conductors as compared with their copolymers, Ppy‐MA. The antibacterial activity of the copolymers, Ppy‐MA, prepared from different monomer ratios and their nanocomposites, Ag@Ppy‐MA, has been carried out using disk diffusion method. The copolymers, Ppy‐MA, and its nanocomposites, Ag@Ppy‐MA, were screened against the standard drug Ciprofloxacin. The results clearly suggest that the nanocomposites, Ag@Ppy‐MA, are better antibacterial agent as compared with their copolymers, Ppy‐MA. Copyright © 2016 John Wiley & Sons, Ltd.