The gas chromatographic detection of manufacturing impurities in illicit cocaine can be enhanced by chemical derivatization and the use of an electron-capture detector. After derivatization of illicit cocaine hydrochloride samples with heptafluorobutyric anhydride, the isolated heptafluorobutyryl derivatives of the cocaine impurities were subjected to capillary gas chromatography-electron capture detection analysis. The on- column detection of cocaine impurities at low picogram levels was possible for compounds such as N-norcocaine and other N-demethylated impurities, amidic by-products, including N-benzoylrecgonine methyl ester and tertiary amines possessing hydroxy functions. The latter compounds include the so- called hydroxycocaine impurities, believed to be new coca leaf alkaloids. This methodology is especially suited for sample comparison analyses.