The invention belongs to the technical field of nano material production, and relates to a preparing method of hollow magnetic carbon nanospheres with MOFs growing inside in a confinement mode. The preparing method includes the steps that FeCl3.6H2O, ethylene glycol, ethyl alcohol and sodium acetate are mixed and subjected to hydrothermal reaction to obtain Fe3O4 spheres, the Fe3O4 spheres, ethyl alcohol, deionized water and ammonia water are mixed to obtain Fe3O4 sphere mixed solution, a silicon source is added dropwises into the Fe3O4 sphere mixed solution to react, then resorcinol and formaldehyde are added to react so as to obtain Fe3O4@SiO2@ resorcinol-formaldehyde resin spheres, Fe3O4@SiO2@C spheres are obtained after calcining under argon and etched by sodium hydroxide water solution to obtain magnetic carbon nanocages; finally the magnetic carbon nanocages react with metallic nitrate and 2-methylimidazole to obtain the hollow magnetic carbon nanospheres which are uniform in size and are distributed uniformly, the morphology of the hollow magnetic carbon nanospheres is controlled well, and the MOFs of the hollow magnetic carbon nanospheres grow inside in the confinement mode. The process is simple, and the materials needed in the reaction process are low in toxicity and harmless.