In the field of psychology and psychiatry, obsessive-compulsive disorder (OCD) has long been the focus of research. As for the causes of compulsive behavior, scholars have proposed from the perspective of psychology that individuals' cognitive models and their early experiences, especially traumatic events, have a shaping effect on compulsive behavior. However, the research on the causes of compulsive behavior still has the problem that the multi-factor mechanism has not been unified, resulting in incomplete analysis of the causes of compulsive behavior. The research on compulsive behavior caused by negative emotions has challenges due to cognitive dissonance, difficulty in emotion regulation and inability to thoroughly analyze the interaction of behavioral pattern learning. This paper will review and analyze the existing literature. In view of the core view that the emergence of compulsive behavior is aimed at relieving negative emotions, it will explore how cognitive dissonance, vicious cycle mechanism, emotion regulation mode selection and other potential factors interact with each other to jointly lead to the formation of compulsive behavior. On this basis, future research directions and suggestions will be put forward. Through in-depth study of the causes of compulsive behavior, it can provide more accurate guidance for clinical treatment.