The plastics industry commonly uses dimethyl phthalate (DMP) as a plasticizer. DMP is highly permeable to nature at different pH levels and temperatures, resulting in the contamination of water, soil, and air. As a result of the high cost, low selectivity, and complicated pretreatment in the DMP detection process, this paper synthesized ferromagnetic nanomaterials with molecular imprinting, simplified the pretreatment process by ferromagnetic nanomaterials, selectively adsorbed DMP using the molecular imprinting method, and finally detected DMP with the material by SERS. Molecular imprinting polymers (MIPs) have a higher affinity for DMP than NIPs, which are characterized by fast adsorption rates, strong binding ability, and improved selective adsorption ability. Furthermore, the MIPs are reusable, exhibiting only about a 7% loss in adsorption capacity after seven adsorption−desorption experiments. As a consequence of the adsorption of DMP onto Fe 3 O 4 @MIPs@Ag, DMP detection was achieved through SERS characterization, and it was found that the DMP concentration was linearly related to the intensity of the corresponding characteristic peak associated with the DMP, with a detection limit of 4.2 × 10 −11 M. According to the tested water samples, the recovery rating ranged from 92.6 to 105%, demonstrating the feasibility of the proposed method for the detection of DMP in real water samples.