The human MT1 and MT2 melatonin receptors1,2 are G-protein-coupled receptors (GPCRs) that help to regulate circadian rhythm and sleep patterns3. Drug development efforts have targeted both receptors for the treatment of insomnia, circadian rhythm and mood disorders, and cancer3, and MT2 has also been implicated in type 2 diabetes4,5. Here we report X-ray free electron laser (XFEL) structures of the human MT2 receptor in complex with the agonists 2-phenylmelatonin (2-PMT) and ramelteon6 at resolutions of 2.8 Å and 3.3 Å, respectively, along with two structures of function-related mutants: H2085.46A (superscripts represent the Ballesteros-Weinstein residue numbering nomenclature7) and N862.50D, obtained in complex with 2-PMT. Comparison of the structures of MT2 with a published structure8 of MT1 reveals that, despite conservation of the orthosteric ligand-binding site residues, there are notable conformational variations as well as differences in [3H]melatonin dissociation kinetics that provide insights into the selectivity between melatonin receptor subtypes. A membrane-buried lateral ligand entry channel is observed in both MT1 and MT2, but in addition the MT2 structures reveal a narrow opening towards the solvent in the extracellular part of the receptor. We provide functional and kinetic data that support a prominent role for intramembrane ligand entry in both receptors, and suggest that there might also be an extracellular entry path in MT2. Our findings contribute to a molecular understanding of melatonin receptor subtype selectivity and ligand access modes, which are essential for the design of highly selective melatonin tool compounds and therapeutic agents.