As persistent organic pollutants, dichlorodiphenyltrichloroethanes (DDTs) and their metabolites pose considerable risks to human health and the environment. Therefore, monitoring DDTs in the environment is essential. Here, we developed a green, simple, and effective magnetic solid-phase extraction (MSPE) method coupled with gas chromatography tandem triple-quadrupole mass spectrometry to determine the DDT content of environmental water samples. A magnetic ionic liquid (IL) adsorbent was developed based on a modified magnetic multiwalled carbon nanotube/zeolitic imidazolate framework-8 (MM/ZIF-8/IL), synthesized by immobilizing the IL on the surface of MM/ZIF-8. We confirmed successful synthesis of MM/ZIF-8/IL by material characterization, and our results suggested that the MM/ZIF-8/IL had a high Brunauer–Emmett–Teller surface area (159.9 m2 g−1), good thermostability (<800 °C), and a high degree of superparamagnetism (52.9 emu g−1). Several experimental conditions affecting the MSPE efficiency were optimized. Under the best conditions, good detection linearity was achieved (0.5–500 µg L−1) with determination coefficients ranging from 0.9927 to 0.9971. The lower limits of detection (0.0016–0.0072 µg L−1) also had good precision, having an intraday relative standard deviation (RSD) ≤ 6.5% and an interday RSD ≤ 8.9%. Finally, we used the as-developed method to determine DDT levels in environmental water samples.