In recent years, development and progress in modern packaging resulting from degradable natural resources have grown remarkably. In this study, chitosan–polyaniline film was prepared with a combination of different concentrations of polyaniline and various synthesis times to produce antimicrobial and biodegradable packaging film. The physical, electrical, and mechanical properties of the films were investigated. The interaction between chitosan and polyaniline was confirmed by Fourier-transform infrared spectroscopy (FTIR) and X-ray diffraction patterns. The size and morphology of the synthesized particles were examined by scanning electron microscopy. The results indicated that the synthesized polyaniline particles had a spherical shape (45–100 nm). The antimicrobial and antifungal activity of the films against Aspergillus niger
fungi (antifungal area: 61.47 mm2) and Escherichia coli
bacteria (antimicrobial area: 187.27 mm2) increased with increasing the concentration of polyaniline. The results obtained from the study of the effect of polyaniline on the electrical conductivity of the chitosan film showed that increasing the polyaniline concentration and synthesis time resulted in decreased electrical resistance of the film, for which the film with the highest aniline concentration and the highest synthesize time had the lowest resistance. According to the mechanical property results, tensile strength (TS) and elastic modulus were increased due to the addition of the polyaniline to the polymer matrix. The chitosan blank film had a lower TS than nanocomposites. As the final results, the chitosan–polyaniline film has good electrical conductivity, indicating that the produced film could be used in intelligent food packaging.