A Knowledge, Attitudes, and Practices (KAP) questionnaire was designed to collect information on farmers’ knowledge of ASF and their practices surrounding that could impact the spread of the disease. The questionnaire was distributed, and data collected, from 233 backyard farmers from five selected Oblasts (Rivne, Kharkiv, Odessa, Zakarpattia and Kiev). Kruskal‐Wallis tests were conducted to identify factors that could influence knowledge, and Dunn tests were performed to determine differences between groups when the Kruskal‐Wallis tests were significant. Spearman tests were carried out to explore the association between knowledge and risky practices. Results show that comprehensive knowledge on ASF is not common in backyard farmers and that risky practices that influence the spread of ASF are regularly performed. Of the respondents, 47% felt well‐informed about how ASF can be transmitted and 31.8% felt confident about recognizing clinical signs of ASF. The independent variable “Oblast” was identified as a significant factor (p = 0.0015) associated with differences in knowledge on clinical signs. We demonstrated statistically significant differences of knowledge between backyard farmers from different Oblasts. Knowledge of preventive measures was positively correlated with risky handling practices related to edible pork products (p = 0.0053) and non‐edible pork products (p = 0.0417). In conclusion, our results show that backyard farmers have knowledge gaps on ASF and practice various risky behaviours that might favour the spread of the disease in Ukraine. There are regional differences in ASF knowledge and risky practices that should be taken into consideration in future evidence‐based ASF prevention and control programs, including public awareness activities.