Transition metal oxides are actively investigated as anode materials for lithium-ion batteries (LIBs), and their nanocomposites with carbon frequently show better performance in galvanostatic cycling studies, compared to the pristine metal oxide. An in situ, scalable method for creating a variety of transition metal oxide-carbon nanocomposites has been developed based on free-radical polymerization and cross-linking of poly(acrylonitrile) in the presence of the metal oxide precursor containing vinyl groups. The approach yields a cross-linked polymer network, which uniformly incorporates nanometre-sized transition metal oxide particles. Thermal treatment of the organic-inorganic hybrid material produces nearly monodisperse metal oxide nanoparticles uniformly embedded in a porous carbon matrix. Cyclic voltammetry and galvanostatic cycling electrochemical measurements in a lithium half-cell are used to evaluate the electrochemical properties of a Fe3O 4-carbon composite created using this approach. These measurements reveal that when used as the anode in a lithium battery, the material exhibits stable cycling performance at both low and high current densities. We further show that the polymer/nanoparticle copolymerization approach can be readily adapted to synthesize metal oxide/carbon nanocomposites based on different particle chemistries for applications in both the anode and cathode of LIBs. © 2011 The Royal Society of Chemistry.