In this study, a new type of magnetic deep eutectic solvent (MDES) based on a novel non-ionic hydrogen bond acceptor of bis(2-ethylhexyl) phosphate, as well as heptanol and CoCl2, was synthesized with low viscosity, certain magnetism, and hydrophobicity. Subsequently, a vortex-assisted dispersive liquid-liquid microextraction method based on the MDES was developed to analyze five non-steroidal anti-inflammatory drugs (NSAIDs) followed by HPLC-UV. Due to the unique properties of MDES, it can spontaneously float onto surface of the sample solution and gather together after extraction, thereby omitting the time-consuming centrifugation process. Under the optimal extraction conditions, this method showed good linearity, low limit of detection, high precision, and high enrichment factor. Satisfactory spiked recoveries in the range of 85.2 %-115.2 % were obtained from two environmental water and two milk samples. Taken together, this simple, convenient, fast, safe, highly efficient, and reliable method can be applied to the analysis of NSAIDs from aqueous samples.