Heroin comes from the seeds of the plant called opium poppy, combined with morphine. Although the opium poppy was cultivated since at least 5400 years ago, it was not until 1874 that swiss scientists decided to combine morphine with other substances in order to create more powerful drugs.
Heroin was discovered by scientists the famous pharmaceutical company Bayer and it was freely availably from 1898 since 1910 when countries started regulating the use of opioids. Heroin, in particular, although it was causing exceptional pain relief, it was extremely addictive and up until today it is the most addictive and the most harmful widely circulating drug.
These were not, however, the worst news for Bayer. In 1919, after the end of World War I Bayer lost the exclusive rights to heroin, as well as the Aspirin. Since there are no close alternatives of both, it is easy to imagine that it would be highly profitable.