Sudden public health crises such as the COVID-19 pandemic have triggered widespread panic buying incidents globally, causing disruptions in commodity markets characterized by imbalances between supply and demand. This has posed a serious threat to social stability. During sudden public health events, panic buying typically complicates epidemic prevention and control efforts, leading to adverse consequences such as resource wastage, supply-demand imbalances, and market failures, which pose a threat to social stability and economic development. The progression of panic buying is significantly influenced by the actions and choices of both the public and local authorities. Therefore, studying the impact of the behavioral decisions made by the public and local governments plays a pivotal role in the evolution of such events. Building upon this premise, this paper studies the role of behavioral decisions in the COVID-19 panic buying event from the perspective of an evolutionary game. First, the public’s attitude toward the development of the event is divided into two categories: those with a negative attitude and those with a positive attitude. At the same time, the concepts of mental benefits and mental costs are introduced and quantified, serving as key factors in public decision-making. Second, prospect theory is used to elucidate the risk preferences and loss aversion of decision-makers. An evolutionary game model is constructed with the public and local governments as the main entities based on prospect theory. The replication dynamic equation is constructed using the benefit perception matrix, and the equilibrium point and stability conditions of the model are deduced. Third, the impact of participants' behavioral decisions during the panic buying event on the event’s evolution process is discussed through numerical simulation analysis. The results show that (1) in the context of sudden public health emergencies, material demand is the primary cause of public panic buying behavior. Postpanic buying events, such behavior is influenced primarily by the proportion of individuals with negative attitudes within the population. Local governments should release positive information regarding supplies in a timely manner during the nascent stage of panic buying events and actively monitor the proportion of individuals with negative attitudes. (2) There is a positive correlation between risk preference and public panic buying behavior, whereas loss aversion has the opposite effect. The spiritual benefits perceived by the public from engaging in panic buying increase with higher risk preference, whereas perceived costs related to health issues increase with deeper levels of loss aversion. (3) When response costs exceed what local governments are willing to bear, reputation gains and losses play a crucial role in their decision-making. The probability of local governments adopting responsive strategies increases with their emphasis on reputation and aversion to reputation losses. Higher-level governments should enhance the dissemination of positive and negative examples of government handling, enhancing local governments' sense of responsibility and honor to improve their perception of reputation gains and losses, thereby encouraging proactive management of panic buying events.