The opium poppy was cultivated in lower Mesopotamia as long ago as 3400 BC. Heroin is produced for the black market by refining opium and the biggest producer being Afghanistan (87 % of the world's heroin). It is grown in Myanmar, Thailand, Vietnam, Laos and Yunnan province in the People's Republic of China. Heroin was first synthesized in 1874 by C. R. Alder Wright, an English chemist working at St. Mary's Hospital Medical School in London, England.

Heroin is a semi-synthetic opioid,synthesized from morphine, a derivative of the opium poppy. It is the 3,6-diacetyl ester of morphine. The white crystalline form is commonly the hydrochloride saltdiacetylmorphine hydrochloride, however heroin freebase may also appear as a white powder. As with other opiates, heroin is used both as a pain-killer and a recreational drug. Frequent administration quickly leads to tolerance and dependence and has a very high potential for addiction.

If sustained use of heroin for as little as three days is stopped abruptly, withdrawal symptoms can appear. The withdrawal syndrome from heroin may begin within 6 to 24 hours of discontinuation of the drug; however, this time frame can fluctuate with the degree of tolerance as well as the amount of the last consumed dose.

One of the most common methods of heroin use is via intravenous injection (colloquially termed "shooting up"). When taken orally, heroin undergoes extensive first-pass metabolism via deacetylation, making it a prodrug for the systemic delivery of morphine.

Heroin is used as a recreational drug for the profound relaxation and intense euphoria it produces, although the latter effect diminishes with increased tolerance. Its popularity with recreational drug users, compared to morphine. Large doses of heroin can cause fatal respiratory depression, and the drug has been used for suicide or as a murder weapon.