The Belgian Malinois (BM) is an excellent working dog that typically shows a circling behavior when placed in a confined space. Moreover, individuals showing moderate running in circles (one kind of obsessive compulsive behavior) in confined spaces typically show better work performance compared to those without the circling behavior or to those with a serious circling behavior (which can be defined as an obsessive compulsive disorder (OCD)). To determine whether the candidate gene CDH2, Cadherin 2, which is associated with OCD in the Doberman pinscher breed of dogs and in humans, was linked with this behavioral character in the BM, population genetic analyses were performed on a BM population and a natural population of the Chinese indigenous dog (CID). Many genetic signals of balancing selection were detected for one specific region of the CDH2 gene, which suggests that a genomic block, which is included in the CDH2 gene, experienced balancing selection in the BM, and that the CDH2 gene might be associated with the behavioral characteristics of the BM dog (a balance between circling behavior and work performance). Moreover one specific variant, G63913941A, which creates a predicted transcription factor-binding site, may be the key mutation in the CDH2 gene affecting the behavior of BMs by allowing the binding of a transcription factor and increasing CDH2 expression.