Melatonin is an indoleamine widely distributed in the evolution that shows a great functional versatility, playing an important role as a transmitter of photoperiodic information and exhibiting antioxidant, oncostatic, anti-aging and immunomodulatory properties. In vertebrates, this molecule is produced by the pineal gland and other extrapineal sites. The present study was carried out to investigate the presence of melatonin in thymus and the possibility of an endogenous melatonin synthesis in this organ, in which T cells are matured. In this work, we demonstrate in humans and rats that thymus contains melatonin, expresses the mRNAs encoding N-acetyltransferase and hydroxyindol-O-methyltransferase, the two key enzymes of the melatonin synthesis, and has this biosynthetic machinery activated. In addition, rat thymocytes cultured for 24 h exhibited high levels of melatonin. The results presented here suggest that human and rat thymuses are able to synthesize melatonin, which could have intracrine, autocrine and paracrine functions.