There has been increasing recognition of the problem of fatal opioid overdose. This review examines the pharmacological basis of respiratory depression following opioid administration. Respiration is controlled principally through medullary respiratory centres with peripheral input from chemoreceptors and other sources. Opioids produce inhibition at the chemoreceptors via mu opioid receptors and in the medulla via mu and delta receptors. While there are a number of neurotransmitters mediating the control of respiration, glutamate and GABA are the major excitatory and inhibitory neurotransmitters, respectively. This explains the potential for interaction of opioids with benzodiazepines and alcohol: both benzodiazepines and alcohol facilitate the inhibitory effect of GABA at the GABAA receptor, while alcohol also decreases the excitatory effect of glutamate at NMDA receptors. Heroin and methadone are the major opioids implicated in fatal overdose. Heroin has three metabolites with opioid activity. Variation in the formation of these metabolites due to genetic factors and the use of other drugs could explain differential sensitivity to overdose. Metabolites of methadone contribute little to its action. However, variation in rate of metabolism due to genetic factors and other drugs used can modify methadone concentration and hence overdose risk. The degree of tolerance also determines risk. Tolerance to respiratory depression is less than complete, and may be slower than tolerance to euphoric and other effects. One consequence of this may be a relatively high risk of overdose among experienced opioid users. While agonist administration modifies receptor function, changes (usually in the opposite direction) also result from use of antagonists. The potential for supersensitivity to opioids following a period of administration of antagonists such as naltrexone warrants further investigation. While our understanding of the pharmacological basis of opioid-related respiratory depression has advanced, better understanding of the role of heroin metabolites, the metabolism of methadone, drug interactions and tolerance would all be of considerable value in knowing how best to respond to this problem.