Ergothioneine is a small, sulfur-containing metabolite (229 Da) synthesized by various species of bacteria and fungi, which can accumulate to millimolar levels in tissues or cells (e.g. erythrocytes) of higher eukaryotes. It is commonly marketed as a dietary supplement due to its proposed protective and antioxidative functions. In this study we report the genes forming the two-step ergothioneine biosynthetic pathway in the fission yeast, Schizosaccharomyces pombe. We identified the first gene, egt1+ (SPBC1604.01), by sequence homology to previously published genes from Neurospora crassa and Mycobacterium smegmatis. We showed, using metabolomic analysis, that the Δegt1 deletion mutant completely lacked ergothioneine and its precursors (trimethyl histidine/hercynine and hercynylcysteine sulfoxide). Since the second step of ergothioneine biosynthesis has not been characterized in eukaryotes, we examined four putative homologs (Nfs1/SPBC21D10.11c, SPAC11D3.10, SPCC777.03c, and SPBC660.12c) of the corresponding mycobacterial enzyme EgtE. Among deletion mutants of these genes, only one (ΔSPBC660.12c, designated Δegt2) showed a substantial decrease in ergothioneine, accompanied by accumulation of its immediate precursor, hercynylcysteine sulfoxide. Ergothioneine-deficient strains exhibited no phenotypic defects during vegetative growth or quiescence. To effectively study the role of ergothioneine, we constructed an egt1+ overexpression system by replacing its native promoter with the nmt1+ promoter, which is inducible in the absence of thiamine. We employed three versions of the nmt1 promoter with increasing strength of expression and confirmed corresponding accumulations of ergothioneine. We quantified the intracellular concentration of ergothioneine in S. pombe (0.3, 157.4, 41.6, and up to 1606.3 µM in vegetative, nitrogen-starved, glucose-starved, and egt1+-overexpressing cells, respectively) and described its gradual accumulation under long-term quiescence. Finally, we demonstrated that the ergothioneine pathway can also synthesize selenoneine, a selenium-containing derivative of ergothioneine, when the culture medium is supplemented with selenium. We further found that selenoneine biosynthesis involves a novel intermediate compound, hercynylselenocysteine. 