The invention relates to a method for measuring 12 types of remaining medicine in a water environment through separation and enrichment at the same time, and belongs to the field of safety detection of a trace of organic pollutant residue in the water environment. The content of 12 types of frequently-used medicine in the water environment (drinking water, faucet water, river water and water discharged into and out of sewage treatment plants) is directly measured with an ultra performance liquid-chromatography-mass spectrometer (UPLC-MS / MS) as a detection tool after a water sample is subjected to solid phase extraction combined with ultrasonic-assisted dispersion liquid-liquid micro-extraction (UA-DLLME) separation and enrichment. The 12 types of antibiotic include ketoprofen, ciprofloxacin, tinidazole, tolfenamic acid, sulfadiazine, sulindac, naproxen, sulfamethoxazole, chloramphenicol, cefuroxime axetil, piroxicam and mefenamic acid. Inspection and optimization are conducted on a sample pretreatment method and instrument detection conditions of the water sample, and the optimal UA-DLLME method is established and is successfully applied to practical sample detection. Compared with a traditional method, the method has the advantages of being high in sensitivity, high in extraction and recycle rate, wide in suitable object, friendly to the environment, and the like.