score:16
According to Paul Devereux in his book Mysterious Ancient America, most of the pre-Columbian American civilizations were controlled by shamanistic cults who used various hallucinogenic substances prepared from plants - mushrooms, cacti, jimson weed, etc - to induce trance-like states which gave them the appearance of "communing with the spirit world", etc and was one of the principle sources of their power over the masses. His book documents this extensively using various forms of archaeological and forensic evidence, and the practice continues even today among some of the Amazon Rain Forest Peoples.
As Devereux explains there, the preparation of these substances was generally a secret among the shaman classes, and their use was restricted to them, and to certain individuals at certain ceremonial points in their lives (male puberty rites, for example) who were given a ration of some sort of hallucinogen to facilitate this ceremony. The masses at large had no access to these compounds, being, as they were, the source of the shamans' power.
So we have here a case of "controlled substances" in the ancient world for clearly political reasons. Nor was it necessary for the ruling cults to engage in invasive micromanagement of the lives of the citizenry to enforce this policy: The substances and their preparation were a secret reserved for the shaman classes - the masses simply had no access to them.
Upvote:4
The following may be a little late historically for OP's uses (though it's hard to know what precisely "medieval" means for a number of countries). But these bans all do precede the 18th century dates found in OP's original research.
The 17th century saw a number of anti-tobacco laws (source):
1633: TURKEY: Sultan Murad IV orders tobacco users executed as infidels.
1634: RUSSIA: Czar [Michael] creates penalties for smoking: 1st offense is whipping, a slit nose, and trasportation to Siberia. 2nd offense is execution.
1635: FRANCE: King allows sale of tobaccco only following prescription by physician.
1638: CHINA: Use or distribution of tobacco is made a crime punishable by decapitation.
1639: NEW YORK CITY: Governor Kieft bans smoking in New Amsterdam
1640s: Bhutan's first ban on smoking in public enacted by the warrior monk Shabdrung Ngawang Namgyal, the founder of modern Bhutan.
Several Muslim rulers banned coffee in the 16th and 17th centuries
1511: Mecca
1525: Mecca
1539: Cairo (source)
1633: Ottoman Empire (source)
Upvote:14
In medieval France at least, the occupation of apothecary was severely restricted by law and required a licence to be lawful (such licences appeared first in Montpellier in the 12th century, probably under the influence of the then famous academy of medicine established there then spread in the rest of France). These licences typically incorporated a prohibition on selling poisons broadly defined as substances able to cause physical harm (more generally, it seems that French people in the Middle Ages and Renaissance were panicked by poisons). Though the ban typically does not contain any detailed list, I think it is reasonable to surmise that hallucinogenic substances would have been considered harmful, as hallucinations were considered diabolical in medieval christian thoughts, and thus to infer that these edicts broadly banned the selling of drugs.
So taking into account that not so many hallucinogenic substances would have been accessible to medieval Frenchmen anyway, it seems that selling them, at the very least, would have been prohibited.
UPDATE:
Piqued by Lennart Regebro's critique, I provide evidence that hallucinogenic substances were prohibited in France during the middle ages. Though there are a few references to cannabaceae (for instance in the books of Hildegarde von Bingen) and opiates (mostly through arabic sources 3) in western middle ages pharmacy, the hallucinogenic substances (outside alcohol) most commonly referenced in middle ages sources derive from the alkaloids naturally present in plants of the solanaceae or apiaceae families. A handful of those were common enough so as to warrant a place of choice in the iconography of western middle ages: belladonna, mandrake, Hyoscyamus and hemlock. The first two in particular can induce narcose and hallucinations and all of them were widely used in middle age pharmacy 3. Many of the edicts mentioned above explicitly restrict the manipulation of mandrake and belladonna to licensed apothecary and their administration to licensed doctors. Hyoscyamus and hemlock were among the most common poisons in the middle ages so obviously fell under the scope of the edicts.
Incidentally, I found in searching for evidence of cannabic use in the middle ages that L.Lewin claims in 4 (chapter Indian Hamp) that cannabis use was prohibited by Emir Sheikouni in 1378, but I was utterly unable to find any outside confirmation of this much repeated factoid (nor in fact to identify this emir).
Sources:
Society d'Histoire de la Pharmacie
Histoire des poisons: Moyen Age (strangely, the English version is very poor in comparison)
References to Bamberg's medical compendium
Phantastica Narcotic and Stimulating Drugs, By Louis Lewin 1924