Conducting and electroactive polymer blends of polyaniline (PAni) with polyelectrolyte, poly(diallydimethylammoniumchloride) (PDDMAC) have been synthesized by an in situ polymerization method and the resulting composites have been characterized by FT-IR, UV–Vis, XRD, AFM and electrochemical techniques. The blends are conducting and electroactive with even lower loadings of PAni and can be cast as films. The conductivity of the cast films containing 0.04–1.5wt% PAni ranged from 4.5×10−6 to 42×10−6 S/cm. Some of the composites are tested for their corrosion inhibition property for pure iron in 1M HCl solutions and were found to be active inhibitors.