Melatonin is synthesized in and secreted from the pineal glands and regulates circadian rhythms. Although melatonin has been reported to modulate the activity of ion channels in several tissues, its effects on pineal ion channels remain unclear. In the present study, the effects of melatonin on voltage-gated K+ (KV) channels, which play a role in regulating the resting membrane potential, were examined in rat pinealocytes. The application of melatonin reduced pineal KV currents in a concentration-dependent manner (IC50 = 309 µM). An expression analysis revealed that KV4.2 channels were highly expressed in rat pineal glands. Melatonin-sensitive currents were abolished by the small interfering RNA knockdown of KV4.2 channels in rat pinealocytes. In human embryonic kidney 293 (HEK293) cells expressing KV4.2 channels, melatonin decreased outward currents (IC50 = 479 µM). Inhibitory effects were mediated by a shift in the voltage dependence of steady-state inactivation in a hyperpolarizing direction. This inhibition was observed even in the presence of 100 nM luzindole, an antagonist of melatonin receptors. Melatonin also blocked the activity of KV4.3, KV1.1, and KV1.5 channels in reconstituted HEK293 cells. The application of 1 mM melatonin caused membrane depolarization in rat pinealocytes. Furthermore, KV4.2 channel inhibition by 5 mM 4-aminopyridine attenuated melatonin secretion induced by 1 µM noradrenaline in rat pineal glands. These results strongly suggest that melatonin directly inhibited KV4.2 channels and caused membrane depolarization in pinealocytes, resulting in a decrease in melatonin secretion through parasympathetic signaling pathway. This mechanism may function as a negative-feedback mechanism of melatonin secretion in pineal glands. NEW & NOTEWORTHY Melatonin is a hormone that is synthesized in and secreted from the pineal glands, which regulates circadian rhythms. However, the effects of melatonin on pineal ion channels remain unclear. The present study demonstrated that melatonin directly inhibited voltage-gated potassium KV4.2 channels, which are highly expressed in rat pinealocytes, and induced membrane depolarization, resulting in a decrease in melatonin secretion. This mechanism may function as a negative-feedback mechanism of melatonin secretion in pineal glands.