Cocaine is one of the most commonly trafficked and abused drugs in the United States, and deployable field tests are important for rapid identification in nonlaboratory settings. At present, colorimetric tests exist for in-field determination, but these fundamentally suffer from interferent effects. Cocaine is an organic salt that is readily water soluble as a cation and almost insoluble in the deprotonated neutral form. Here, we take advantage of the electrochemical window of water to increase the pH at the electrode surface by driving water reduction, effectively electroprecipitating the cocaine base. The precipitate on the electrode surface is then electrochemically oxidized by a voltammetric sweep through sufficiently positive potentials. We demonstrate excellent selectivity to cocaine compared to common adulterants, such as procaine, lidocaine, benzocaine, caffeine, and levamisole. Finally, we detect cocaine on a carbon fiber microelectrode, demonstrating miniaturizability and allowing access to low-resistance media (e.g., tap water).