The pathway resulting in the formation of ergothioneine from histidine. Histidine undergoes three methylations by a histidine-alpha-N-methyltransferase (EC:2.1.1.44) to form N-alpha,N-alpha,N-alpha-trimethyl-L-histidine (also known as hercynine or histidine betaine). N-alpha,N-alpha,N-alpha-trimethyl-L-histidine is modified by the ligation of gamma-glutamyl-cysteine and oxygen; this intermediate undergoes further modification by the removal of glutamate to produce hercynylcysteine sulfoxide. Finally, a beta-lyase acts on this compound, removing pyruvate, ammonia and oxygen to produce ergothioneine.