Polyaniline-NiFe2O4 nanofiber composites were successfully synthesized at the interface of water and ionic liquid via in situ polymerization using cetyl trimethylammonium bromide (CAB) as surfactant. Both TG analysis and FT-IR measurements proved the presence of organic layer on the surface of NiFe2O4 nanoparticles. The influence of 1-butyl-3-methyl-imidazolium bromide [BMIM]Br as ionic liquid on the structure, conductivity and magnetic property of polyaniline-NiFe2O4-CFAB nanocomposite were studied in detail. The results show that imidazolium-based ionic liquids BMIMBr acts as an anchor agent for the formation of morphology in polyaniline-NiFe2O4-CTAB nanocomposite. Introduction of ionic liquids obviously improves the conductivity but weakens the magnetization of polyaniline-NiFe2O4 nanocomposite. (c) 2012 Elsevier Ltd. All rights reserved.