A method for producing hercynine on an industrial scale comprises the steps of:
1. reacting L-histidine, in a polar solvent or a mixture of polar solvents, with a methylating agent, MeX, at room temperature under controlled pH conditions;
2. separating the organic products from the inorganic salts formed during the reaction by electrodialysis; and the electrodialysis is carried out on a reaction medium adjusted to a pH between 8.5 to 9.5;
3. recrystallization of L-histidine betaine (hercynine) to eliminate organic impurities.