Heroin is an addictive narcotic derived from morphine. A heroine is a female protagonist in a work of fiction. Although heroine is traditionally the feminine equivalent of hero, hero is now a gender-neutral term for a person who acts with extraordinary courage. Heroine still appears from time to time in reference to female real-life heros, but it is increasingly rare.
Example
Most 21st-century writers have no qualms about using hero in reference to a female, as happens here:
She is a hero to those who think urban schools need big changes and a villain to those who think the reform movement is off-track. [Washington Post]
Now Susan Guy has been labelled a hero after she discovered Mrs Wilson, who lives alone, had fallen and was unable to get up or reach a phone. [Daily Mail]
Heroine is reserved for certain contexts, usually in reference to fictional stories—for example:
I even enjoy psycho-thrillers in which the ostensible heroine is unmasked as the assassin. [Guardian]
Two words that describe the stubborn determination of both the movie’s teenage heroine and the soused U.S. marshal she hires to avenge her father’s murder. [USA Today]
In her debut novel, Roberta Rich introduces a unique heroine, and her wry humour leavens a serious subject. [Globe and Mail]
And of course, heroin, without the e, is the correct spelling of the drug—for example:
Sitharthan points to the pioneering work of the US psychologist Lee Robins, who in 1972 studied heroin addiction among Vietnam war veterans. [Sydney Morning Herald]
A Jersey City man and a resident of Delaware were busted yesterday after undercover cops purchased drugs from a heroin drug delivery service, police said. [The Star-Ledger]