The nano-Co
3O
4 and nano-CoFe
2O
4 modified SBA-15 magnetic mesoporous, Co
3O
4 /SBA-15 and CoFe
2O
4/SBA-15 composites were prepared by immersion method. The microstructure and magnetic properties of the composites were analyzed by X-ray diffraction (XRD), transmission electron microscopy (TEM), field emission scanning electron microscopy (FESEM) and vibrating sample magnetometer (VSM). All results indicate that Co
3O
4 and CoFe
2O
4 nanoparticles exist in the mesopores of SBA-15, which can improve the magnetic properties of the SBA-15 nanocomposites. The study reveals that the magnetic properties of SBA-15 nanocomposites are attributed to the doped magnetic nanoparticles. And the magnetic properties are improved with the content of Co
3O
4 and CoFe
2O
4 nanoparticles, in which the coercivity reaches the maximum of 400 Oe and the saturation magnetization is 9emu/g.