Cyanide is a great threat to public health, environmental safety and homeland security because of its extremely high toxicity and widespread usage in industry. Countering such a threat can be greatly aided by a rapid, sensitive, on-site detection method. Here, a pinhole shell-isolated nanoparticle-enhanced Raman spectroscopy (SHINERS) technique for cyanide sensing has been established, and a limit of detection lower to 1 μg l 1 level in water was achieved on a portable Raman spectrometer, owing to the magnificent local electromagnetic field enhancement generated by the interaction between cyanide anion and the uncovered Au surface inside the pinholes. Meanwhile, the silica shell outside the Au core could significantly improve the stability of the substrate by preventing the dissolution of Au in cyanide solution, thereby making this assay more feasible for practical use. The linear range was from 1 to 100 μg l 1 with excellent selectivity over thiocyanide and other common ions. For applications on complex matrices such as polluted water, beverages etc., a simple online hydrogen generator was designed and successfully coupled with pinhole SHINERS to achieve a good measurement of cyanide. This pinhole SHINERS-based method is rapid, simple, with good stability and feasibility for the in-field detection of cyanide, and we hope that it will further raise more opportunities for portable SERS applications. Copyright © 2014 John Wiley & Sons, Ltd.