The hair samples of six opiate addicts, who died after heroin overdose, were investigated by gas chromatography-mass spectrometry after extraction with 10 solvents differing in polarity and hydrophilicity in an ultrasonic bath. Morphine, 6-monoacetylmorphine (MAM), and codeine were detected in all cases, and heroin was detected in four cases. With toluene, which is hydrophobic, almost no extraction occurred, and with the nonprotic solvents dioxane, acetonitrile, acetone, and dimethyl sulfoxide, only a relatively low extraction rate was found. The yield increased in the series of alcohols from n-propanol to isopropanol to ethanol to methanol. Water proved to have almost the same extraction capability as methanol. Using equal conditions, the extraction rate of the opiates decreased in the following order: heroin > MAM > morphine = codeine. Addition of 1% acetic acid or 1% triethylamine to methanol led to a decrease in the heroin yield and an increase in the morphine yield. The results are discussed in terms of the binding between the hair matrix and the drug, the penetration of the solvent into the hair, and the solubility of the drug in the solvent.