Melatonin is sometimes used to treat sleep disorders owing to its effects on circadian rhythms, but the underlying mechanisms are not known. In this study, knockout of G-protein-coupled inwardly rectifying potassium channel 2 (GIRK2) in mice reduced the phase-advancing effects (in which the onset of behavioural activity started at an earlier time) of melatonin on wheel-running behaviour and reduced spontaneous firing frequency in suprachiasmatic nucleus neurons, suggesting that melatonin activation of GIRKs is sufficient to affect circadian rhythms.