In the 19th and early 20th Centuries, many addictive substances, such as opiates and cocaine, were constituents in various medications.
Medical use of these substances could lead to addiction, and recreational use could occur under the guise of medical use.
Addiction to laudanum (a mixture of opium and alcohol) was a recognised feature of 19th Century Britain, and was written about as early as 1821 by Thomas de Quincey in his Confessions of an English Opium Eater. Opium was also smoked from the 1800s onwards, in both Asian and European countries.
There is also evidence for the use of marijuana in French society as early as 1844, and for the use of cocaine and marijuana in American society in the early 20th Century.