The 1998 Nipah virus outbreak in Malaysia resulted in major financial losses to the multi-million-dollar swine industry. While productivity and biosecurity of pig farms have improved since, biosecurity in some farms remains substandard with farmers struggling to adapt to current national pig farming policies. Farm viability and animal health depends on farmers' role as decision-makers in managing disease threats and other aspects of farm management. This study aimed to describe the mental model of farmers in making decisions about disease prevention and control measures during the 1998 Nipah virus outbreak, and in 2019, 20 years after the last reported Nipah case. Using a qualitative approach, in-depth, semi-structured interviews with 12 pig farmers (mostly small-scale or medium-scale farms) were conducted in three states in Malaysia. Data were analyzed via inductive content analysis. Thirty-six unique dimensions in the mental model were identified, representing six interrelated themes corresponding to participants' decision making related to disease prevention and control: drivers of action to prevent and control disease; perception of practice options; individual determinants of familiar practices; external social factors; external economic factors; and additional external factors. Key drivers of disease control and prevention responses during the Nipah outbreak included heightened perception of risk, emotions, perceived economic loss, and subjective norms whereas key drivers in 2019 included perception of risk, perceived effectiveness, perceived benefits, and other dimensions such as perception of the future, perceived economic cost, barriers, and loss. An unfavorable future outlook, perceived economic factors, and socio-political and personal factors currently hinders farm improvement and adoption of Pig Farming Areas (PFAs) and Modern Pig Farming (MPF) systems. Private sector service providers and veterinarians are highly influential in advocating for good biosecurity, herd health, and animal health intervention practices. Insights gained can inform the development of strategic policies and interventions.