Abstract In this work, new polymeric aniline-barium ferrite and aniline-strontium ferrite thin layers were synthesized. In the first step, hexaferrites nano-additives were prepared by applying ultra-sound and microwave irradiation. Then, hexaferrites were added to aniline electrolyte solution separately. The electrodeposition of aniline as a polymeric matrix and hexaferrite as nano-additives was performed in an electrochemical cell in the presence of various acids. Scanning electron microscopy images were applied for morphology investigation and measuring average particle size. Energy dispersive X-ray spectroscopy was applied for elemental detection and analysis, as well as presence confirmation of nanoparticles. Atomic force microscopy was applied for surface roughness analysis of thin films. Magnetic property of the nanoparticles and polymeric nanocomposites was checked and measured by vibrating sample magnetometer. The crystallinity, crystallite size, and phase of samples were confirmed by X-ray diffraction pattern analysis.