For thousands of years, cultures around the world utilized the cannabis plant as food, fiber and medicine. Cannabis appears in the first materia medica ever written. The earliest Chinese pharmacoepoia, Shen Nung’s Pen Ts’ao Ching (Divine Husbandman’s Classic of Materia Medica), was passed on by oral tradition and dates back to between 2637 and 2737 B.C.E. Nung is considered the Chinese god of agriculture and possibly the mythical Second Emperor of China.
Researchers date the oldest written compilation that still survives documenting these Chinese oral medical traditions to between 300 and 200 B.C.E. The original text no longer exists but is said to have been composed of three volumes containing 365 entries describing hundreds of natural medicants.
Over time, the medicinal use of cannabis spread from China, India and the Middle East to Europe. Hemp was well known in Europe in the Middle Ages. It was used to make beer and used as an ingredient in gruel, a common grain breakfast cereal of the time. In the 15th century, the Pope labeled cannabis as an instrument of the devil because of its healing capabilities. This papal action practically eliminated the medical use of cannabis by mainstream physicians in Europe. It was, however, used by midwives, also known as witches. It wasn't until the early 19th century that the medicinal use of cannabis was reintroduced into Europe by Dr. W.B. O’Shaughnessy, a British physician.
In the late 1830s, O’Shaughnessy returned to England from India, where he was involved in a project to install the telegraph across the country. Upon his return, he reintroduced cannabis to Western medicine. By the middle of the 19th century, cannabis became an important medicine in America. It caught on quickly and was widely used in many pain relief preparations. Cannabis was even prescribed in the 1890s to Queen Victoria of England by her royal physician, Sir J. Russell Reynolds, for relief of the pain of her menstrual cramps.
Cannabis has been known for centuries as one of the best treatments for relief of the symptoms of migraine headaches, particularly for relief from the accompanying pain and nausea. Sir William Osler, usually acknowledged as the founder of modern medicine and one of the four founders of the John Hopkins School of Medicine, dubbed cannabis the best migraine treatment in The Principles and Practice of Medicine (1892), often considered the first textbook of internal medicine.
From the 1850s to the early 1940s, cannabis was a popular ingredient in both patent and prescription medications. Medicinal cannabis products were manufactured by such well known pharmaceutical firms as Eli Lilly, Squibb, Parke-Davis, Sharp and Dohme, Merck and the Smith Brothers. In the 1920s American physicians wrote three million cannabis-containing prescriptions per year. According to the American Medical Association, in the late 1930s, the use of medicinal cannabis had decreased because the product was hard to standardize and had a relatively short shelf life. It remained in the United States Pharmacopoeia (USP) until 1942.
 O’Shaughnessy, William Brooke. “On the preparations of the Indian Hemp, or Gunjah: Cannabis indica their efforts on the animal system in health, and their utility in the treatment of tetanus and other convulsive diseases.” Provincial Medical Journal and Retrospect of the Medical Sciences 5, no. 123 (1843): 363.
 “History of Marijuana as Medicine – 2900 BC to Present,” ProCon. Accessed February 1, 2018. https://medicalmarijuana.procon.org/view.timeline.php?timelineID=000026/.
 Herer, Jack, Jeff Meyers, and Leslie Cabarga. “Cannabis Drug Use in 19th Century America,” in The emperor wears no clothes. Ah Ha Pub., 1998. Last modified; February 1, 2018. http://jackherer.com/emperor-3/
 Pharmacopeia, United States. “12th rev.” Accessed February 1, 2018. http://antiquecananbisbook.com/Appendix/USP1942.htm/.