Understanding the function of nitric oxide, a lipophilic messenger in physiological processes across nervous, cardiovascular and immune systems, is currently impeded by the dearth of tools to deliver this gaseous molecule in situ to specific cells. To address this need, we have developed iron sulfide nanoclusters that catalyse nitric oxide generation from benign sodium nitrite in the presence of modest electric fields. Locally generated nitric oxide activates the nitric oxide-sensitive cation channel, transient receptor potential vanilloid family member 1 (TRPV1), and the latency of TRPV1-mediated Ca2+ responses can be controlled by varying the applied voltage. Integrating these electrocatalytic nanoclusters with multimaterial fibres allows nitric oxide-mediated neuronal interrogation in vivo. The in situ generation of nitric oxide in the ventral tegmental area with the electrocatalytic fibres evoked neuronal excitation in the targeted brain region and its excitatory projections. This nitric oxide generation platform may advance mechanistic studies of the role of nitric oxide in the nervous system and other organs.