Opioid medications are frequently used in the effective treatment of intractable pain, but prolonged use of such medications can be complicated by a host of adverse effects. Among these adverse effects, tolerance and mental clouding can be especially disabling and can lead to both a reduced effectiveness of treatment and a reduced quality of life for many requiring treatment with these medications. Here we examined the relative contributions of complete Freund’s adjuvant (CFA)-induced inflammatory pain and opioid medication on spatial memory for a well-learned task in male Sprague–Dawley rats. Although CFA, by itself, had little effect on spatial memory, morphine administered to pain-free animals produced profound detrimental effects on spatial memory that persisted longer than the analgesic effectiveness of the drug. However, no significant cognitive deficits were observed in animals receiving morphine in the presence of CFA-induced pain. Taken together, these results are evidence that the pain state of the organism can alter some of the negative effects of morphine.