Drug addiction, as in He'd had a monkey on his back for at least two years. [Slang; first half of 1900s]
A vexing problem or burden, as in This project has proved to be a monkey on my back—there seems to be no end to it. Both usages allude to being unable to shake off the animal from one's back.