Cannabidiol (CBD) is a major nonpsychotomimetic component of Cannabis sativa that has been shown to have an anxiolytic effect in human and animal models. Earlier studies suggest that these effects involve facilitation of serotonin, a neurotransmitter that has also been related to obsessive–compulsive disorder. On the basis of this evidence, this study investigated the effects of CBD in C57BL/6J mice submitted to the marble-burying test (MBT), an animal model proposed to reflect compulsive behaviour. CBD (15, 30 and 60 mg/kg) induced a significant decrease in the number of buried marbles compared with controls (34, 41 and 48%, respectively). A similar, although larger, decrease was also found after the serotonin selective reuptake inhibitor paroxetine (10 mg/kg, 77% decrease) and the benzodiazepine diazepam (2.5 mg/kg, 84% decrease). The effect of CBD (30 mg/kg) was still significant after 7 days of daily repeated administration, whereas the effect of diazepam disappeared. Pretreatment with WAY100635 (3 mg/kg), a 5HT1A receptor antagonist, prevented the effects of paroxetine but failed to alter those of CBD. These latter effects, however, were prevented by pretreatment with the CB1 receptor antagonist AM251 (1 mg/kg). These results indicated that CBD and paroxetine decrease the number of buried marbles in the MBT through distinct pharmacological mechanisms. They also suggest a potential role of drugs acting on the cannabinoid system in modulating compulsive behaviour.