In this paper, a magnetic core–shell composite with MgNi2FeO4.5nanotubes as core and carbon nanotubes (CNTs) as shell was synthesized by in situ growth of CNTs on the surface of MgNi2FeO4.5nanotubes via a catalytic chemical vapor deposition method. The MgNi2FeO4.5nanotubes were prepared using a mixed aqueous solution of Mg(NO3)2, Ni(NO3)2and Fe(NO3)3(molar ratio of 1:2:1) and anodic aluminum oxide as template. Both the growth temperature and time of CNTs brought about effect on the structure and magnetic property of the composite were investigated. X-ray diffraction, transmission electron microscope, field emission scanning electron microscope, Raman spectroscopy and vibrating sample magnetometer were used to characterize the as-prepared samples. The MgNi2FeO4.5nanotubes are parallel arranged, and the exterior surface of which is wrapped by CNTs when the growth temperature exceeding 480 °C. Magnetic measurement demonstrates the composite with higher growth temperature and shorter growth time possesses more excellent magnetic property.