A heroin epidemic mathematical model with prevention information and treatment, as control interventions, is analysed, assuming that an individual's behavioural response depends on the spreading of information about the effects of heroin. Such information creates awareness, which helps individuals to participate in preventive education and self-protective schemes with additional efforts. We prove that the basic reproduction number is the threshold of local stability of a drugfree and endemic equilibrium. Then, we formulate an optimal control problem to minimize the total number of drug users and the cost associated with prevention education measures and treatment. We prove the existence of an optimal control and derive its characterization through Pontryagin's maximum principle. The resulting optimality system is solved numerically. We observe that among all possible strategies, the most effective and cost-less is to implement both control policies.