In this paper, magnetic mesoporous carbon composites were prepared by calcination of the mixture of magnesium citrate and Fe3O4@SiO2 in an inert atmosphere. A high content of Fe3O4@SiO2 and MgO was in situ embedded in a carbon matrix. After removing the MgO template by diluted acid, the resulting material (Fe3O4@SiO2@mC) was subjected to further H2O2 oxidation treatment. The formed oxygen-containing functional groups on the products provided plenty of active sites for the adsorption of analytes of interest. The obtained composites (Fe3O4@SiO2@mC-H2O2) exhibited a mesoporous structure with a high specific surface area of 731 m2 g–1. The adsorption capacities of Fe3O4@SiO2@mC-H2O2 for Cu(II) and Pb(II) were calculated to be 86.5 and 156 mg g–1, respectively. Under optimal conditions, the adsorption isotherm of Cu(II) and Pb(II) onto Fe3O4@SiO2@mC-H2O2 fitted the Langmuir model and the adsorption kinetic was well-correlated with the pseudo-second-order model. Besides, Fe3O4@SiO2@mC-H2O2 exhibited fast removal dynamics (within less than 1 min) for Cu(II) and Pb(II), demonstrating great application potential in wastewater treatment.