A specific and sensitive method using high-performance liquid chromatography-tandem mass spectrometry (LC-MS-MS) equipped with automatic on-line solid-phase extraction device for the quantitative measurement of anabolic hormone residues, 4-androstene-3,17-dione, testosterone and dihydrotestosterone in cell culture medium was developed. Steroid content in cell culture medium was determined directly without an additional sample preparation step. Separation of analytes from polar endogenous compounds was carried out on an automatic column-switching device coupled with a C4-alkyl-diol silica restricted-access solid-phase extraction column. The lipophilic fraction containing anabolic hormone residues were back-flushed on to a conventional C-18 reversed-phase column for the final chromatography. The analyte was ionized in an ElectroSpray interface under positive ion mode before entering a quadrupole mass analyzer. The lowest points of calibration curves were 0.05 ng ml(-1) for 4-androstene-3,17-dione and testosterone, and 1 ng ml(-1) dihydrotestosterone, respectively. A comparison with results from radioimmunoassay (RIA) is also presented.