Abstract:The Third Plenary Session of the Twentieth Central Committee of the Communist Party of China proposed to improve the system of enhancing the resilience and security level of the industrial chain and supply chain, and promoting the deep integration of the real economy and the digital economy. In order to improve the ability of pig farming enterprises to prevent and control epidemics, and to enhance the safety level of pig farming, this study constructs a panel fixed-effect model to empirically analyze the impacts of liquidity constraint on the capacity to cope with epidemic risk and to test the mediating role of biosecurity inputs based on a panel data of Chinese pig farming enterprises between 2019 and 2023. In addition, this study utilizes a difference-in-differences model to explore the role of supply chain finance in alleviating liquidity constraint and improving the ability to cope with epidemic risk, as well as to examine its nonlinear effects. Results show that: 1) the alleviation of liquidity constraint significantly improves the effectiveness of prevention and control of epidemics; 2) biosecurity inputs mediate between liquidity constraints and the ability to cope with epidemic risk; 3) supply chain finance can effectively alleviate enterprises’ liquidity constraint and improve their ability to cope with epidemic risk, but there is an optimal intensity of use; and 4) there is scale and regional heterogeneity in the impacts of liquidity constraint on epidemic risk coping capacity. Accordingly, this study suggests: improving enterprise liquidity management capacity and risk awareness; optimizing the regional coordination mechanism, promoting the balanced development of pig farming enterprises; and strengthening the effectiveness and enthusiasm of enterprise biosecurity inputs. Finally, this paper also suggests that the application of supply chain finance should adopt the principle of moderation.