While heroin and opium production, and corruption of the local society, is concentrated in Helmand province, in southern Afghanistan, the smuggling of the drugs out of the country has also corrupted the Iran and Tajik border areas. The governments of Afghanistan, Iran and Tajikistan all try to stop the movement of drugs. But local warlords, at least on the Afghan side of the border, see the smuggling as an opportunity. The Afghan drug gangs have to pay a high fee to get the drugs across the border. While money will do to take care of the Afghan and Tajik border guards, the Iranians are much more hostile. The main reason is the growing number of Iranian drug addicts (about two million). Most Iranian junkies can only afford opium, but the children of the wealthy, which includes a lot of the clergy, can afford heroin. This hits right at home for the Iranian leadership, and these fathers have responded with thousands of religiously motivated Revolutionary Guards patrolling the Afghan border.
Hundreds of smugglers, and border boards, are killed or wounded each year, along the Iran-Afghan border, and thousands of people arrested. You'd think that the smugglers would shift all their efforts to Tajikistan (or Pakistan, where the Pushtun tribes make it easier to get across the border). But one of the most lucrative markets is the Persian Gulf, and Europe beyond. The quickest way there is through Iran, so the heavily armed smugglers keep coming.
The growth of addiction in Afghanistan and Pakistan, and the long time partnership between the Taliban and the drug gangs, is one of the reasons for the widespread hostility to the Taliban in Afghanistan and adjacent countries. But the gangs have lots of money, and the Taliban have religious fanaticism. Thus this drug fueled mayhem is formidable, and difficult to stop.