Self-deception refers to an individual holding inflated beliefs about their abilities, plays a crucial role in human behavior and decision-making. Individuals may inflate their abilities when subject to comparisons with others. This study examined the impact of social comparison on self-deception through the implementation of two behavioral experiments. In Experiment 1, we recruited a sample of 152 undergraduate students. Participants were falsely informed that they performed better (downward comparison) and worse (upward comparison) than average on a game. Subsequently, their level of self-deception was assessed by asking them to predict their performance in a future game, with more inflated predictions indicating greater self-deception. In Experiment 2, we gathered 126 undergraduate students to broaden the current study. This experiment examined the combined effects of comparison direction and comparison gap on self-deceptive behavior. The findings showed that self-deception was more common in circumstances of upward comparison than in downward comparison or no comparison (Experiment 1). Furthermore, Individuals were more inclined to participate in self-deception when encountering a notable performance gap relative to others, particularly in scenarios involving upward social comparison (Experiment 2). The findings suggested that when confronted with threatening social comparative information, people tended to use self-deception to protect themselves. Members of the large gap group experienced strong feelings of unfairness and negative emotions, which led to self-protective behaviors and a greater likelihood of self-deception.