MDMA was first synthesized in 1912 by Merck chemist Anton Köllisch. At the time, Merck was interested in developing substances that stopped abnormal bleeding. Merck wanted to evade an existing patent, held by Bayer, for one such compound: hydrastinine. At the behest of his superiors Walther Beckh and Otto Wolfes, Köllisch developed a preparation of a hydrastinine analogue, methylhydrastinine. MDMA was an intermediate compound in the synthesis of methylhydrastinine, and Merck was not interested in its properties at the time.[127] On 24 December 1912, Merck filed two patent applications that described the synthesis of MDMA[128] and its subsequent conversion to methylhydrastinine.[129]
Over the following 65 years, MDMA was largely forgotten. Merck records indicate that its researchers returned to the compound sporadically. In 1927, Max Oberlin studied the pharmacology of MDMA and observed that its effects on blood sugar and smooth muscles were similar to ephedrine's. Researchers at Merck conducted experiments with MDMA in 1952 and 1959.[127] In 1953 and 1954, the United States Army commissioned a study of toxicity and behavioral effects in animals of injected mescaline and several analogues, including MDMA. These originally classified investigations were declassified and published in 1973.[130] The first scientific paper on MDMA appeared in 1958 in Yakugaku Zasshi, the Journal of the Pharmaceutical Society of Japan. In this paper, Yutaka Kasuya described the synthesis of MDMA, a part of his research on antispasmodics.[131]