The present disclosure relates to a method for synthesizing ergothioneine or one of the derivatives thereof of following formula (I):or a physiologically acceptable salt, a tautomer, a stereoisomer or a mixture of stereoisomers in all proportions thereof,from a compound of betaine type of following formula (II):or a physiologically acceptable salt, a tautomer, a stereoisomer or a mixture of stereoisomers in all proportions thereof,by cleavage reaction in the presence of a thiol, at a temperature above or equal to 60° C.The present disclosure also relates to compounds of formula (II) and the method of synthesis thereof.