To 'have a monkey on your back' was American slang, as long ago as the 1860s, for 'to be angry'. By the 1940s, that had come to mean 'to be a drug addict' with the word 'monkey' itself meaning 'addiction'. People trying to kick such a habit were said to be 'trying to get the monkey off their backs'.