Heroin was developed for addicts to treat morphine addiction.
Not exactly what I've heard. The story as I remember it is that a German chemist had noted morphine's strong analgesic properties; wanting to improve on them (and perhaps decrease the problems with CNS depression of breathing at high doses), he chemically cooked up morphine to add a couple of acetyl groups to it. (This was by analogy of addition of acetyl groups to salicylic acid (quite similar to oil of wintergreen...) to produce acetesalicylic acid (aspirin)).
The modified morphine was to be a "heroic" treatment for pain, hence the name, "hero"-in.
Full Disclosure: Read my tagline before complaining.
Cheers!