A novel automatic strategy for the use of micro- and nanomaterials as sorbents for dispersive microsolid phase extraction (D-μ-SPE) based on the lab-in-syringe concept is reported. Using the developed technique, the implementation of magnetic metal-organic framework (MOF) materials for automatic solid-phase extraction has been achieved for the first time. A hybrid material based on submicrometric MOF crystals containing Fe3O4 nanoparticles was prepared and retained in the surface of a miniature magnetic bar. The magnetic bar was placed inside the syringe of an automatic bidirectional syringe pump, enabling dispersion and subsequent magnetic retrieval of the MOF hybrid material by automatic activation/deactivation of magnetic stirring. Using malachite green (MG) as a model adsorption analyte, a limit of detection of 0.012 mg/L and a linear working range of 0.04-2 mg/L were obtained for a sample volume equal to the syringe volume (5 mL). MG preconcentration was linear up to a volume of 40 mL, obtaining an enrichment factor of 120. The analysis throughput is 18 h(-1), and up to 3000 extractions/g of material can be performed. Recoveries ranging between 95 and 107% were obtained for the analysis of MG in different types of water and trout fish samples. The developed automatic D-μ-SPE technique is a safe alternative for the use of small-sized materials for sample preparation and is readily implementable to other magnetic materials independent of their size and shape and can be easily hyphenated to the majority of detectors and separation techniques.