In this paper, an empirical method based on game theory is employed to investigate the necessity and strategy of righteousness and courage. Firstly, a single prisoner's dilemma game model is established, and its limitations are analyzed. Secondly, the number of games is expanded, and the repeated game model is utilized to examine the optimal strategy for individuals. Next, the concept of finite rationality is introduced, and the characteristics of strategy superiority and inferiority are considered. The positive effects of brave behavior for righteousness on social groups are studied using the evolutionary game model. Finally, based on the empirical results, corresponding suggestions are offered, including encouraging residents to establish a concept of morality and integrity, rather than simply being "good people", and urging the government to foster a harmonious atmosphere in society and improve the legal protection system for righteous and courageous acts, with the aim of motivating people to take courageous actions that promote righteousness.