The neuromodulator melatonin synchronizes circadian rhythms and related physiological functions through the actions of two G-protein-coupled receptors: MT1 and MT2. Circadian release of melatonin at night from the pineal gland activates melatonin receptors in the suprachiasmatic nucleus of the hypothalamus, synchronizing the physiology and behaviour of animals to the light-dark cycle1-4. The two receptors are established drug targets for aligning circadian phase to this cycle in disorders of sleep5,6 and depression1-4,7-9. Despite their importance, few in vivo active MT1-selective ligands have been reported2,8,10-12, hampering both the understanding of circadian biology and the development of targeted therapeutics. Here we docked more than 150 million virtual molecules to an MT1 crystal structure, prioritizing structural fit and chemical novelty. Of these compounds, 38 high-ranking molecules were synthesized and tested, revealing ligands with potencies ranging from 470 picomolar to 6 micromolar. Structure-based optimization led to two selective MT1 inverse agonists-which were topologically unrelated to previously explored chemotypes-that acted as inverse agonists in a mouse model of circadian re-entrainment. Notably, we found that these MT1-selective inverse agonists advanced the phase of the mouse circadian clock by 1.3-1.5 h when given at subjective dusk, an agonist-like effect that was eliminated in MT1- but not in MT2-knockout mice. This study illustrates the opportunities for modulating melatonin receptor biology through MT1-selective ligands and for the discovery of previously undescribed, in vivo active chemotypes from structure-based screens of diverse, ultralarge libraries.