Various neuromodulation approaches have been employed to alter neuronal spiking activity and thus regulate brain functions and alleviate neurological disorders. Infrared neural stimulation (INS) could be a potential approach for neuromodulation because it requires no tissue contact and possesses a high spatial resolution. However, the risk of overheating and an unclear mechanism hamper its application. Here we show that midinfrared stimulation (MIRS) with a specific wavelength exerts nonthermal, long-distance, and reversible modulatory effects on ion channel activity, neuronal signaling, and sensorimotor behavior. Patch-clamp recording from mouse neocortical pyramidal cells revealed that MIRS readily provides gain control over spiking activities, inhibiting spiking responses to weak inputs but enhancing those to strong inputs. MIRS also shortens action potential (AP) waveforms by accelerating its repolarization, through an increase in voltage-gated K+ (but not Na+) currents. Molecular dynamics simulations further revealed that MIRS-induced resonance vibration of –C=O bonds at the K+ channel ion selectivity filter contributes to the K+ current increase. Importantly, these effects are readily reversible and independent of temperature increase. At the behavioral level in larval zebrafish, MIRS modulates startle responses by sharply increasing the slope of the sensorimotor input–output curve. Therefore, MIRS represents a promising neuromodulation approach suitable for clinical application.