BackgroundNegative affect (NA) and craving are often independently examined as precipitators of relapse among individuals with substance use disorders, including opioid use disorder (OUD). Recent ecological momentary assessment (EMA) research has revealed that NA and craving frequently co-occur within individuals. Yet we know little about the general patterns of, and variability in, within-person associations between NA and craving, as well as whether the nature and degree of within-person NA-craving coupling predicts post-treatment time-to-relapse. MethodsSeventy-three patients (77 % male, Mage = 30.10, Range = 19–61) in residential treatment for OUD took part in a 12-day, 4× daily smartphone-based EMA study. Linear mixed-effects models tested within-person, day-level associations between self-reported NA and craving during treatment. The study used Person-specific slopes (i.e., average within-person NA-craving coupling for each participant) estimated from the mixed-effects model in survival analyses with Cox proportional hazards regression models to determine if between-person differences in the within-person coupling predicted post-treatment time-to-relapse (operationalized as the return to problematic use of any substance except tobacco), and whether this prediction was similar across patients' average levels of NA and craving intensity. The study monitored relapse through a combination of hair samples and reports from patients or alternative contacts via a voice response system twice a month for up to 120 days or more following discharge. ResultsAmong the 61 participants with time-to-relapse data, those with stronger positive within-person NA-craving coupling on average during residential OUD treatment had a lower hazard of relapsing (slower time to relapse) post-treatment than participants with weaker NA-craving slopes. The significant association held after controlling for interindividual differences in age, sex, and average levels of NA and craving intensity. Average NA and craving intensity did not moderate the association between NA-craving coupling and time-to-relapse. ConclusionsInterindividual differences in average within-person, day-level NA-craving coupling during residential treatment predict OUD patients' post-treatment time-to-relapse.