As laboratories are called upon to develop novel, fast, and sensitive methods, here we present a completely automated method for the analysis of cocaine and its metabolites (benzoylecgonine, ecgonine methyl ester, ecgonine and cocaethylene) from whole blood. This method utilizes an online solid-phase extraction (SPE) with high performance liquid chromatographic separation and tandem mass spectrometric detection. Pretreatment of samples involve only protein precipitation and ultracentrifugation. An efficient online solid-phase extraction (SPE) procedure was developed using Hysphere MM anion sorbent. A gradient chromatography method with a Gemini C6-Phenyl (50mmx3.00mm i.d., 5microm) column was used for the complete separation of all components. Analysis was by positive ion mode electrospray ionization tandem mass spectrometry, using multiple reaction monitoring (MRM) to enhance the selectivity and sensitivity of the method. For the analysis, two MRM transitions are monitored for each analyte and one transition is monitored for each internal standard. With a 30-microL sample injection, linearity was analyte dependent but generally fell between 8 and 500ng/mL. The limits of detection (LODs) for the method ranged from 3 to 16ng/mL and the limits of quantitation (LOQs) ranged from 8 to 47ng/mL. The bias and precision were determined using a simple analysis of variance (ANOVA: single factor). The results demonstrate bias as <7%, and %precision as <9% for all components at each QC level.