Three-dimensional (3D) surface enhanced Raman scattering (SERS) substrates were produced by magnetic force assisting self-assembled nanoparticles in arrayed holes. Compared to '2D' plasmonic structures used in conventional SERS substrates, the 'hot spots' existed on whole depth of the 3D SERS substrates, which greatly enhanced the sensitivity. The prepared 3D SERS substrate was able to detect 4-aminothiophenol with a concentration down to 1 pM. Furthermore, the substrate was applied to detect hexachlorobenzene residue in soil, indicating its great potential for rapid and sensitive detection of extreme low concentrated molecules, especially pollutants residues in foods and environments.