A simple method is presented for the simultaneous determination of morphine, 6-acetylmorphine, codeine, cocaine, benzoylecgonine, cocaethylene, methadone and 2-ethylidene-1,5-dimethyl-3,3-diphenylpyrrolidine (EDDP) in vitreous humor by high-performance liquid chromatography with photodiode array detector after solid-phase extraction with Oasis® HLB cartridges and dichloromethane as eluent. The chromatographic process was carried out using an XTerra® RP8 column (250 × 4.6 mm i.d., 5 µm particle size) and a mobile phase composed of acetonitrile and pH 6.5 phosphate buffer in gradient mode. A linear response from the detector was obtained within the concentration range of 0.1–4 µg ml−1, with correlation coefficients higher than 0.99. The limits of detection were lower than 30 ng ml−1 for all the drugs studied, the coefficients of variation fluctuated between 0.1 and 12.4%, and the average recoveries were higher than 78% for all the drugs except for EDDP, with a value of 66.4%. Finally, the proposed method was applied to 15 vitreous humor samples coming from individuals who had died from opiate and/or cocaine overdose, showing consumption of cocaine in 14 cases, methadone in five cases and heroin in three cases. Average concentrations of 0.30 µg ml−1 for morphine, 0.24 µg ml−1 for 6-acetylmorphine, 0.10 µg ml−1 for codeine, 0.81 µg ml−1 for cocaine, 1.26 µg ml−1 for benzoylecgonine, 0.15 µg ml−1 for cocaethylene, 0.11 µg ml−1 for methadone and 0.68 µg ml−1 for EDDP were obtained. Copyright © 2012 John Wiley & Sons, Ltd.