This paper reports a systematic approach to the development of a method that combines continuous solid-phase extraction and gas chromatography-mass spectrometry for the simultaneous determination of 20 pharmacologically active substances including antibacterials (chloramphenicol, florfenicol, pyrimethamine, thiamphenicol), nonsteroideal anti-inflammatories (diclofenac, flunixin, ibuprofen, ketoprofen, naproxen, mefenamic acid, niflumic acid, phenylbutazone), antiseptic (triclosan), antiepileptic (carbamazepine), lipid regulator (clofibric acid), β-blockers (metoprolol, propranolol), and hormones (17α-ethinylestradiol, estrone, 17β-estradiol) in milk samples. The sample preparation procedure involves deproteination of the milk, followed by sample enrichment and cleanup by continuous solid-phase extraction. The proposed method provides a linear response over the range of 0.6-5000 ng/kg and features limits of detection from 0.2 to 1.2 ng/kg depending on the particular analyte. The method was successfully applied to the determination of pharmacologically active substance residues in food samples including whole, raw, half-skim, skim, and powdered milk from different sources (cow, goat, and human breast).