Multifunctional magnetic mesoporous nanocomposites are promising materials to remove the various pollutants from water due to the remarkable properties such as multiple binding sites, high surface area, and magnetic separation. Herein, we have developed a versatile nanocomposite, in which polydopamine (PDA) coated Fe3O4 nanoparticles are introduced during the synthesis of SBA-15 matrix for the first time to enhance adsorptive properties of hydrophilic magnetic mesoporous nanocomposite by combining the properties of high surface area, magnetization, and capability of interacting with more functional groups in one material. The resulting nanocomposite, Fe3O4@PDA@SBA-15, has been proved to be the effective sorbent for the removal of cationic dye, which can be ascribed to the functional groups of grafted PDA and the textural features of matrix SBA-15. On the other hand, after chemical modification via silanization of vinyltriethoxysilane (VTES), Fe3O4@PDA@SBA-15 nanocomposite turned to be a hydrophobic material, Fe3O4@PDA@SBA-15@VTES, which can adsorb oil with high adsorption capacity which could reach 8.83 times of its own weight. Moreover, both nanocomposites could be recycled by facile washing and drying processes. The materials provide a simple strategy for the preparation of multifunctional magnetic mesoporous nanocomposites satisfying various applications in water treatment.