Electrical and magnetic function materials have many potential applications. A magnetic and conducting Ni-doped Fe3O4/polypyrrole (PPy) nanocomposite with a core–shell structure was prepared by in situ polymerisation of a pyrrole monomer in an aqueous solution containing a dispersion of Ni-doped Fe3O4 nanoparticles. The structure and properties of Ni-doped Fe3O4/PPy nanocomposites were characterised by X-ray diffraction (XRD), TEM, infrared spectrometry (IR), vibrating sample magnetometry (VSM) and thermogravimetry (TG). The results showed that the Ni-doped Fe3O4 nanoparticles were completely coated by polypyrrole; the resultant Ni-doped Fe3O4/PPy nanocomposites exhibited a good superparamagnetic behaviour and the saturation magnetisation was as high as 25·2 emu g−1 owing to the adoption of Ni-doped Fe3O4 as the magnetic source. In addition, the influences of Ni-doped Fe3O4 content on the electromagnetic properties of resultant nanocomposites were preliminarily investigated.