In this paper, magnetic ZIF-67 composites were prepared by an in situ method and utilized in the magnetic solid-phase extraction of phthalate esters.