The long-anticipated high-resolution structures of the human melatonin G protein-coupled receptors MT 1 and MT 2 , involved in establishing and maintaining circadian rhythm, were obtained in complex with two melatonin analogs and two approved anti-insomnia and antidepression drugs using X-ray free-electron laser serial femtosecond crystallography. The structures shed light on the overall conformation and unusual structural features of melatonin receptors, as well as their ligand binding sites and the melatonergic pharmacophore, thereby providing insights into receptor subtype selectivity. The structures revealed an occluded orthosteric ligand binding site with a membrane-buried channel for ligand entry in both receptors, and an additional putative ligand entry path in MT 2 from the extracellular side. This unexpected ligand entry mode contributes to facilitating the high specificity with which melatonin receptors bind their cognate ligand and exclude structurally similar molecules such as serotonin, the biosynthetic precursor of melatonin. Finally, the MT 2 structure allowed accurate mapping of type 2 diabetes-related single-nucleotide polymorphisms, where a clustering of residues in helices I and II on the protein-membrane interface was observed which could potentially influence receptor oligomerization. The role of receptor oligomerization is further discussed in light of the differential interaction of MT 1 and MT 2 with GPR50, a regulatory melatonin coreceptor. The melatonin receptor structures will facilitate design of selective tool compounds to further dissect the specific physiological function of each receptor subtype as well as provide a structural basis for next-generation sleeping aids and other drugs targeting these receptors with higher specificity and fewer side effects.