CoFe2O4 nanoparticles anchored into in-situ formed carbon nanofibres were synthesized by a simple solvent-free and template-free pyrolysis-oxidation process and have been investigated as a promising anode material for Li-ion batteries. Ferrocene and cobaltocene as precursor materials, act as both metal and carbon sources. Carbon contents in the composite can be easily adjusted by varying oxidation conditions. The as-prepared composites show a high and stable capacity. More than 700 mAh g−1 based on the total mass of the as-prepared composite was obtained in the composite with 36% carbon content after long-term cycling of 250 cycles. The superior electrochemical properties are suggested to be benefited from the synergistic effects by combining CoFe2O4 and carbon and also their intimate contact developed in the synthetic process. This work opens a facile and broadly applicable way for fabrication and utilization of metal oxide/mixed metal oxide-carbon composites for Li-ion batteries.