The orbitofrontal cortex (OFC) is involved in compulsive drug seeking and drug relapse. Its involvement in cue‐, context‐, and stress‐induced reinstatement of drug seeking has also been confirmed in animal models. Deep brain stimulation (DBS) was proposed to be an effective intervention for patients with treatment‐refractory addiction. Therefore, in the present study, we investigated the potential efficacy of DBS in the OFC for controlling addictive‐like behaviors in rats. Rats were bilaterally implanted with electrodes in the OFC and trained to the morphine conditioned place preference (CPP; 3, 5, and 7 mg/kg). High‐frequency (HF; 130 Hz) or low‐frequency (LF; 13 Hz) DBS‐like stimulation was applied during the conditioning (40 minutes, once daily, 3 days) or extinction (20 minutes, once daily, 6‐10 days) trials. Following the extinction, morphine preference was reinstated by a priming dose of morphine (2 mg/kg). When applied during the conditioning phase, HF‐DBS significantly decreased preference for the morphine‐associated context. HF‐DBS during the extinction phase of morphine CPP reduced the number of days to full extinction of morphine preference and prevented morphine priming–induced recurrence of morphine preference. LF‐DBS did not change any of these addictive behaviors. HF‐DBS had no significant effect on novel object recognition memory. In conclusion, HF‐DBS of the OFC prevented morphine preference, facilitated extinction of morphine preference, and blocked drug priming–induced reinstatement of morphine seeking. These findings may indicate a potential applicability of DBS in the treatment of relapse to drug use. Further studies will be necessary to assess the translatability of these findings to the clinic.