The use goes back to ancient times. The Sumerian medical clay tablet (dated approximately 2100 BC) is considered the oldest known prescription document. It was used for medical purposes in many ancient countries.
In Southeast Asia, opium was known as the “joy plant”. Hippocrates called poppy juice a narcotic. And it’s assumed that Galen who promoted medical opium use in Rome knew about its abuse potential.
As it can be seen from the infographic created by AddictionResource authors, today, opium is used in pharmacology. It’s a popular substance of drug trafficking.