This is, for obvious reasons, not suitable to try at home. Nor possible, since no technique is described in detail. But should you want to add accuracy to your next steampunk story, or entertain/terrify any guests in your garden, allow me to explain just how heroin is made from poppies.
Despite what you may have heard, the seeds of the poppy are not commonly made into opium and heroin. The drugs come from the goo inside the seed pods. When the pods are green and full, slitting the side will cause the pod to 'bleed' a sticky white fluid that quickly turns brown when it's exposed to air. It's firm enough that it can be collected into balls or bricks to be processed into heroin, but opium addicts don't generally have to go that far. They find ways to consume the goo itself.
This is not even remotely a good idea. People get addicted to the opium made from the poppies they grow themselves or buy from stores. They can also, under some circumstances, get arrested and face quite a few years in jail for possession of the flowers, should authorities believe that they are making them into opium products. In fact, even growing them is technically illegal, though having and selling the seeds is not.
Even without an arrest, opium takes a toll on your circulation, which is why opiate users often are cold, feel dizzy, have sallow skin, pass out, and slip into comas. Just as a bonus, opiates take out your respiration, so you're always straining for breath. What's more gauging exactly how potent any one species of opium poppy is is difficult, so it's relatively easy to take too much.
Making heroin is more involved. First manufacturers boil the balls of opium with water. They throw in lime, the same thing that breaks down feces or dead bodies, to take out the organic particles and drop them to the bottom of the pot. The organic stuff was what first caused the discoloration, the browning, of the sap, and so what's left is a white goo on top of the boiling water. This is morphine. It was smoked regularly by the Dutch in the 17th century, and has been used since then.
That's the last stage that's easy. After that, there are many stages to isolating and purifying heroin, all of which need a decent lab. The morphine has to be boiled with acetic anhydride, a fairly common chemical, then the resulting mess has to be cleaned with water and chloroform. In turn, the water and chloroform also have to be stripped away by adding sodium carbonate, to precipitate the heroin. Then charcoal and alcohol are used to get the sodium carbonate away from the heroin. And lastly, the alcohol has to be carefully evaporated.
The better heroin makers then choose to purify it even more. And they had better hope they're better. The last purification involves hydrochloric acid and a process that is volatile enough to explode at any time.
From then on, it's out of the chemistry lab and onto the street, by various means. Although it is not technically legal to grow the specific kinds of poppy that produce opium, the seeds of those poppies are commonly sold, and commonly grown in regular gardens. Right now they seem to exist in a legal twilight, where possibly the growers could be in trouble, but no one cares enough to arrest some lady with poppies in her yard.
Image: Lajsikonik, Wiki Commons