Overestimating the occurrence of threatening events has been highlighted as a central cognitive factor in the maintenance of obsessive-compulsive disorder (OCD). The present study examined the different facets of this cognitive bias, its underlying mechanisms, and its specificity to OCD. For this purpose, threat estimation, probabilistic classification learning (PCL) and psychopathological measures were assessed in 23 participants with OCD, 30 participants with social phobia, and 31 healthy controls. Whereas healthy participants showed an optimistic expectation bias regarding positive and negative future events, OCD participants lacked such a bias. This lack of an optimistic expectation bias was not specific to OCD. Compared to healthy controls, OCD participants overestimated their personal risk for experiencing negative events, but did not differ from controls in their risk estimation regarding other people. Finally, OCD participants’ biases in the prediction of checking-related events were associated with their impairments in learning probabilistic cue-outcome associations in a disorder-relevant context. In sum, the present results add to a growing body of research demonstrating that cognitive biases in OCD are context-dependent.