In-line solid-phase extraction-capillary electrophoresis coupled with mass spectrometric detection (SPE-CE-MS) has been used for determination of 2-ethylidene-1,5-dimethyl-3,3-diphenylpyrrolidine (EDDP), codeine (COD), hydrocodeine (HCOD), and 6-acetylmorphine (6AM) in urine. The preconcentration system consists of a small capillary filled with Oasis HLB sorbent and inserted into the inlet section of the electrophoresis capillary. The SPE-CE-MS experimental conditions were optimized as follows: the sample (adjusted to pH 6.0) was loaded at 930 mbar for 60 min, elution was performed with methanol at 50 mbar for 35 s, 60 mmol L(-1) ammonium acetate at pH 3.8 was used as running buffer, the separation voltage was 30 kV, and the sheath liquid at a flow rate of 5.0 μL min(-1) was isopropanol-water 50:50 (v/v) containing 0.5% acetic acid. Analysis of urine samples spiked with the four drugs and diluted 1:1 (v/v) was studied in the linear range 0.08-10 ng mL(-1). Detection limits (LODs) (S/N = 3) were between 0.013 and 0.210 ng mL(-1). Repeatability (expressed as relative standard deviation) was below 7.2%. The method developed enables simple and effective determination of these drugs of abuse in urine samples at the levels encountered in toxicology and doping.