In the face of a sudden major epidemic, people's panic may likely lead to the disruption of the public opinion ecosystem and the disorder of public opinion order. Therefore, clarifying the key main bodies and mechanisms in governing online public opinion is of crucial significance for effectively managing and guiding it. Firstly, based on the sentiment analysis of opinion leaders, an evolutionary game model involving the government, netizens, and opinion leaders was constructed. It analyzed the gaming relationships among relevant stakeholders in the process of online opinion dissemination. Then, a simulation experiment is carried out to analyze the evolution of each stakeholder's strategy choice, and the effectiveness of the simulation scenario is verified by NLP technology. The research results show that when dealing with online public opinion during a major epidemic, the government should choose an appropriate time to intervene and reduce the cost of interfering with public opinion. The change in punishment intensity by the government has a greater impact on opinion leaders than on netizens. Additionally, when the government guides opinion leaders, increasing the degree of reward for opinion leaders is more effective than increasing the intensity of punishment.