Background and Aim: The spread of the COVID-19 pandemic has led to a number of instances of large-scale panic buying. Taking the COVID-19 pandemic as an example, this paper explores the impact of panic in uncertain environments on panic buying behavior. Under certain circumstances, the spread of rumors about shortage of goods is likely to cause large-scale panic buying. This paper focuses on the study of such panic buying caused by online rumors. Methods: Firstly, based on the improved BA network, this paper constructs a directed network for public opinion communication and integrates an offline communication network to build a two-layer synchronous coupling network based on online and offline communications. Secondly, the individual decision model and the panic emotion transmission model under the uncertain environment are constructed. Netizens judge the authenticity of network information, determine their own panic degree according to the above two models, and judge whether they participate in the panic buying based on the above factors. Finally, the spread of the public opinion of goods buying under the panic state is simulated and analyzed. Results: The experimental results of the two-layer synchronous network that integrates offline interaction are significantly different from the results of pure online interaction, which increases the speed of public opinions spread after offline interaction and affects a wider range of groups. Under the condition of sufficient supplies, panic in local areas will not cause large-scale panic buying on the whole network. However, the results under the same parameters suggest that if there is a shortage of supplies, panic will spread quickly across the network, leading to large-scale panic buying. It is very important to ensure sufficient supply of materials at the beginning of the spread of rumors, which can reduce the number of buyers. However, if there is a shortage of goods before the panic dissipates in the later stage, there will still be a large-scale rush purchase. Conclusion: These results explain the reasons why it is difficult to stop the buying events in many areas under the COVID-19 pandemic. Under the uncertain environment, the panic caused by people's fear of stock shortage promotes the occurrence of large-scale rush buying. Therefore, in the event of major public health events, ensuring adequate supply of materials is the top priority.