Context Food security is one of the major concerns in the Philippines. Although livestock and poultry production accounts for a significant proportion of the country’s agricultural output, smallholder households are still vulnerable to food insecurity. Aims The current study aims to examine how livestock production and selling difficulties affect food-insecure conditions of smallholder households. Methods The study employed the mindsponge theory as its theoretical foundation for constructing the models. Subsequently, it applied the Bayesian mindsponge framework (BMF) analytics to analyse a dataset sourced from the Data in Emergencies Monitoring (DIEM) system of the Food and Agriculture Organization. Key variables in the dataset were transformed into indicators, enabling a detailed examination of smallholder livestock farmers’ difficulties in production or selling over the past 3 months. Production difficulties include hurdles in raising and producing livestock, covering aspects such as resource acquisition, animal health, and breeding. Selling difficulties involve obstacles in selling livestock products, including issues related to market access, pricing, and transportation. Key results Production and selling difficulties significantly adversely affect food security in the Philippines, with varying impacts according to the severity of food insecurity. In particular, production and selling difficulties equally affect the households’ likelihood of eating less healthy and nutritious food. However, the production difficulties have more negligible impacts on the possibility of skipping meals than do selling difficulties, and even ambiguous impacts on the likelihood of not eating for a whole day compared with the effects of selling difficulties. Moreover, we also found that the market plays a crucial role in facilitating not only livestock trading but also livestock production (e.g. purchase of feed and medicines). Conclusions Our research has highlighted the complex connection among livestock, markets, and food security within the Philippine setting. It emphasised the significant impact of selling difficulties, particularly the heavy reliance on nearby local and regional markets, in exacerbating the severity of food insecurity. Implications On the basis of these findings, we suggest that the livestock market needs to be expanded and regulated to balance livestock products and services used for livestock production and facilitate the product-exchanging mechanism.