Light-activated ion channels provide a precise and noninvasive optical means for controlling action potential firing, but the genes encoding these channels must first be delivered and expressed in target cells. Here we describe a method for bestowing light sensitivity onto endogenous ion channels that does not rely on exogenous gene expression. The method uses a synthetic photoisomerizable small molecule, or photoswitchable affinity label (PAL), that specifically targets K+ channels. PALs contain a reactive electrophile, enabling covalent attachment of the photoswitch to naturally occurring nucleophiles in K+ channels. Ion flow through PAL-modified channels is turned on or off by photoisomerizing PAL with different wavelengths of light. We showed that PAL treatment confers light sensitivity onto endogenous K+ channels in isolated rat neurons and in intact neural structures from rat and leech, allowing rapid optical regulation of excitability without genetic modification.