Heroin itself barely exists in the body long enough to be measured. Within minutes of use, it is converted into other compounds, and it is those compounds, not heroin itself, that a drug test actually finds. That single fact explains most of the confusion around this question. The honest answer depends on which specimen is tested, which chemical marker the lab is looking for, and how heavily and recently the drug was used.
What the body does to heroin almost immediately
Heroin (diacetylmorphine) is rapidly broken down after it enters the body. Research summarized on the NIH Bookshelf describes heroin as having a remarkably short plasma half-life, on the order of 2 to 6 minutes following intravenous use, after which it is metabolized to 6-monoacetylmorphine, commonly written as 6-MAM or 6-AM, and then to morphine, both of which are what continue to bind opioid receptors in the brain and body. The intermediate compound, 6-AM, does not stick around long either. The same research describes 6-AM as having a half-life of roughly 6 to 25 minutes before it is hydrolyzed into morphine, which is one reason forensic and clinical testing so often finds morphine and codeine in a sample rather than heroin or 6-AM directly (National Institutes of Health, National Institutes of Health, StatPearls).
That short chain of events, heroin to 6-AM to morphine, is the entire reason "how long does heroin stay in your system" has more than one answer. Heroin itself is gone almost as fast as it arrives. What a test actually reports is whichever downstream compound is still present at the moment the sample is collected.
Detection windows by specimen type
These are general ranges drawn from published research and federal guidance. Actual results vary with dose, frequency of use, individual metabolism, hydration, and the sensitivity of the specific test used, so no number here should be read as a guarantee for any one person.
| Specimen | What is typically found | General detection window | Notes |
|---|---|---|---|
| Urine | Morphine and codeine (opiate group); 6-AM only briefly | Roughly 1 to 3 days for the opiate group after typical use; one clinical review notes heavy, chronic use can extend positivity to around 11 days. 6-AM itself is described as present for only about 6 hours | Standard federal opiate immunoassay screening cutoff is 2,000 ng/mL; 6-AM has its own separate cutoff |
| Oral fluid (saliva) | Heroin, 6-AM, and morphine | Heroin itself up to about 12 hours; 6-AM roughly 30 minutes to 8 hours; morphine about 2 to 12 hours, at research cutoffs near 1 ng/mL | Because collection happens close to the time of use, oral fluid captures 6-AM more often than urine does |
| Blood/plasma | Heroin (very briefly), 6-AM, then morphine | Heroin's own half-life is only about 2 to 6 minutes, and 6-AM's is about 6 to 25 minutes; a blood draw must happen very soon after use to catch either. Morphine remains measurable longer | Used mainly in clinical or forensic settings, not routine screening |
| Hair | Morphine and codeine metabolites; heroin-specific 6-AM is rarely recovered | Reflects a longer history of use than urine, but new use will not appear until hair has grown out enough to be cut, generally about 7 to 10 days | A study comparing self-reported opioid use to test results found hair testing identified fewer confirmed positives than urine testing in the same group of participants |
Sources: NIH Bookshelf, NIH Bookshelf, StatPearls, National Institutes of Health, National Institutes of Health.
Why 6-AM is the marker that actually proves heroin
Morphine alone does not prove heroin use. Morphine can come from heroin, from a prescription for morphine itself, from codeine metabolizing in the body, or in trace amounts from eating poppy seeds. That last point trips people up more than any other, and it is worth reading in more detail in our separate piece on poppy seeds and opiate false positives.
6-acetylmorphine is different. It is a metabolite that only comes from heroin. Poppy seeds do not produce it. A prescription for morphine or codeine does not produce it. Research on oral fluid testing states plainly that "the confirmed presence of 6-AM... is indicative of heroin use" (National Institutes of Health). That is why a lab report distinguishing 6-AM from a general morphine or opiate result carries so much more weight. A positive for morphine or codeine tells you an opiate was present. A confirmed positive for 6-AM tells you, specifically, that heroin was used, and recently, since the window for 6-AM is so short.
How the opiate screen and confirmation actually work
Under the federal Mandatory Guidelines for workplace drug testing, laboratories run an initial immunoassay screen for the grouped analyte "codeine/morphine," commonly called the opiates screen, at a cutoff of 2,000 ng/mL. A specimen that screens positive then goes to confirmatory testing, where codeine and morphine are each confirmed at 2,000 ng/mL. 6-acetylmorphine is tested separately, with its own initial and confirmatory cutoff of 10 ng/mL, a much lower threshold reflecting how little of it is typically present (Federal Register, HHS/SAMHSA Mandatory Guidelines). Employers subject to Department of Transportation rules follow this same cutoff and confirmation structure under 49 CFR Part 40 (Electronic Code of Federal Regulations, Title 49 Part 40).
Outside of federally regulated testing, cutoffs are not universal. Point of care drug testing cups used in clinics, treatment programs, and non-DOT workplaces are often calibrated to different opiate cutoffs than the federal standard, and a lower cutoff will flag lighter or more recent use that a higher federal cutoff would miss. Anyone selecting or reading results from a rapid cup should confirm which cutoff that specific device uses rather than assuming it matches the 2,000 ng/mL federal figure. For a broader look at how cutoff concentrations work across drug classes, see our SAMHSA and DOT cutoff levels reference.
A non-negative screen is not a final result. It goes to a certified laboratory for confirmatory testing, and a Medical Review Officer reviews the confirmed result, including any legitimate medical explanation, before it is reported as verified.
Why individual results vary so much
The ranges above are general, not personal predictions. Dose, purity, and route of administration all change how much of a drug and its metabolites end up in the body. Frequency of use matters too. Someone who has used only once will typically clear the opiate group faster than someone with heavy, repeated use, which is part of why clinical sources describe such a wide window, from roughly a day to over a week, for the same drug class. Body composition, hydration, kidney and liver function, and the sensitivity and cutoff of the specific test used all shift the picture further. None of these variables can be reliably predicted in advance for a given individual, and nothing in this article should be used to estimate, plan around, or attempt to influence when a test will turn negative.
Where testing fits in treatment and monitoring
In treatment settings, drug testing is not primarily about catching someone. It is a monitoring tool that supports the treatment itself. The National Institute on Drug Abuse describes contingency management, one of the behavioral approaches used alongside medication for opioid use disorder, as a system where "patients earn 'points' based on negative drug tests, which they can exchange for items that encourage healthy living" (National Institute on Drug Abuse). Testing in that context is a way of recognizing progress and adjusting care, not a one-time pass or fail event.
Medications used to treat opioid use disorder, including methadone, buprenorphine, and naltrexone, work on the same receptor system heroin does, which is exactly why programs pair medication with regular, structured testing rather than a single screen. Facilities building or maintaining a monitoring program can review what to look for in a supplier in our guide on drug testing for rehabilitation and addiction treatment centers. Anyone looking for treatment for themselves or a family member can reach the free, confidential SAMHSA National Helpline at any hour by calling 1-800-662-4357 (Substance Abuse and Mental Health Services Administration).
Frequently asked questions
What does it mean if a test is positive for opiates but 6-AM is not detected?
It usually means an opiate metabolite, most often morphine or codeine, was present, but the specific window for 6-AM had already closed, or the source was not heroin at all. Because 6-AM disappears from the body so quickly, its absence does not rule out heroin use, it just means the test was not run soon enough after use, or that another opiate source, such as a prescription medication or poppy seed consumption, is a possible explanation that a Medical Review Officer would consider.
Can eating poppy seeds cause a positive opiate result?
Yes, poppy seeds can contain trace amounts of morphine and codeine and have been documented to cause positive opiate immunoassay results at standard cutoffs. What poppy seeds cannot produce is 6-AM, which is why a confirmed 6-AM result is the more specific evidence of heroin use rather than a general opiate screen. Our detailed article on poppy seeds and opiate false positives covers this in depth.
How soon after use will a urine test detect heroin?
Urine testing generally does not detect heroin itself, since it converts to other compounds almost immediately. What shows up is the opiate group, morphine and codeine, typically within hours of use and for roughly 1 to 3 days afterward, longer with heavy repeated use. The heroin-specific 6-AM marker has a much narrower window and is generally only recoverable for a matter of hours.
Does hair testing show heroin use from months ago?
Hair testing is generally described in the research as covering a longer history than urine or blood, but it has real limitations for opioids specifically. It cannot detect very recent use, since hair has to grow out before it can be cut and tested, and studies comparing hair results to self-reported use have found it identifies fewer confirmed opioid cases than urine testing does in the same population.
Is a blood test the most reliable way to detect heroin?
Blood testing is used mainly in clinical and forensic settings rather than routine screening, and it has the narrowest window of any specimen for heroin itself, since the parent drug and 6-AM both clear from plasma within minutes. Morphine remains detectable in blood longer than either heroin or 6-AM, but blood is not generally a practical choice for standard workplace or program testing.
This article is general information, not medical or legal advice, and it is not intended to help anyone evade or manipulate a drug test. Detection windows vary by individual and by test, state laws on drug testing and treatment vary, and anyone with questions about a specific result or a substance use concern should speak with a qualified medical professional or contact the SAMHSA National Helpline.



