The chemical reactions and pathways resulting in the formation of ergothioneine, a naturally occurring metabolite of histidine with antioxidant properties.
2-mercaptoergothioneine trimethylbetaine synthesis