The invention discloses magnetic polystyrene foam. Foam serves as a load matrix, the surface of the foam is loaded with a polystyrene slice layer and Fe3O4 nano-particles covered with hollow oleic acid, interconnected high-hydrophobic materials of a three-dimensional network structure are provided, and the loaded polystyrene slice layer and the loaded super-paramagnetic Fe3O4 nano-particles covered with the hollow oleic acid serve as adsorption and magnetic recovery carriers. The Fe3O4 nano-particles covered with the hollow oleic acid are ultrasonically dispersed in an ethanol solution, the foam is immersed in a uniformly-mixed solution of the Fe3O4 particles covered with the hollow oleic acid to be ultrasonically dispersed, magnetic foam is obtained, the magnetic foam is added and dissolved in a sodium dodecyl benzene sulfonate solution to be ultrasonically homogenized, styrene and divinylbenzene are added under the N2 atmosphere, a polymerization reaction is conducted under the effect of an initiator, namely, 2,2'-azobisisobutyronitrile, and finally the magnetic polystyrene foam is obtained. The cyclic utilization rate of the magnetic polystyrene foam is high, the heat stability of an oil absorption material is enhanced, and the application range of the material is widened.