Well, all depends on that what do you mean by the substitute for heroin, what exactly are you looking for? I guess that you're searching similar effects, and looking after something which has nearly the same effects as heroin has (ie. you are not looking for substitution therapy for heroin addiction)...
It'd be morphine of course, because morphine is the core of heroin or the mother of heroin, and all the heroin is in itself nothing but acetylated morphine And heroin is simply synthesized from morphine by adding two acetyl groups to morphine molecule; and thus another name for heroin is diacetylmorphine.
All the primary effects of heroin are caused by the molecule of morphine, because human body removes the acetyl groups quickly, or acetyl groups will break down after heroin reach the brain... and thus although the double acetyl group is like a vehicle or turbine which transports morphine molecule to your brain faster and delivered it through BBB, then in fact, heroin is plain prodrug, because before there are effects on CNS, diacetylmorphine has undergone the deacetylation process in the human body and transformed to morphine.
It is true that heroin has differing effects thn morphine, and it causes less histamine release etc side-effects, and is more powerful than morphine at mg basis. Still morphine has also some pharmacological advantages... one is its longer duration.
And heroin has one, main problem over every other problems related to it, and that is its illegality in the most of countries. And although that could notcause any pharmacological effect, it is horrible practical and juridical problem. It is practically impossible to get or to find legal heroin from where ever, with the exception of some countries where there are some bizarre ways to get heroin more or less legally.
The legality thing makes heroin problematic so that it makes, many people bit hesitant to take heroin, some not wanting heroin... and a few never even thinking about taking it.