The primary objectives were to isolate and identify Klebsiella pneumoniae (K. pneumoniae), and determine the antimicrobial resistance patterns and biofilm formation abilities of the isolates. Additionally, the study aimed to investigate the antimicrobial and anti-biofilm effects of cinnamon oil against K. pneumoniae isolates. A cross-sectional study was conducted from March 2022 to April 2023 to collect 200 samples (including 156 nasal swabs and 44 lung specimens) from pneumonic sheep and goats admitted to the Veterinary Teaching Hospital of Zagazig University, Egypt. K. pneumoniae was isolated from a total of 72 (36%) samples, with 53 (73.6%) isolates recovered from nasal swabs and 19 (26.4%) from lung samples. Among the samples, 52 (36.9%) were from sheep and 20 (33.9%) were from goats. Antimicrobial susceptibility testing of the 72 K. pneumoniae isolates to 18 antimicrobials revealed that all isolates were resistant to ampicillin, amoxicillin/clavulanic acid, cefotaxime, ceftriaxone, tetracycline, colistin, fosfomycin, and trimethoprim/sulphamethoxazole. None of the isolates were resistant to amikacin, imipenem, and norfloxacin. Multidrug resistance (MDR) was observed in all K. pneumoniae isolates recovered from sheep and goats. The average MAR index was 0.71, ranging from 0.50 to 0.83. Regarding biofilm formation, among the K. pneumoniae isolates with a high MAR index (n = 30), 10% exhibited strong formation, 40% showed moderate formation, 43.3% displayed weak formation, and 6.7% did not form biofilms. Additionally, the biofilm-forming genes treC and fimA were present in all 28 biofilm-forming K. pneumoniae isolates, while the mrkA gene was detected in 15 (53.6%) of the 28 isolates. MDR K. pneumoniae isolates with strong biofilm formation abilities were treated with cinnamon oil at varying concentrations (100%, 75%, 50%, and 25%). This treatment resulted in inhibition zone diameters ranging from 35 to 45 mm. Cinnamon oil exhibited lower minimum inhibitory concentration and minimum bactericidal concentration values compared to norfloxacin for all isolates. Additionally, cinnamon oil significantly reduced the expression of biofilm-associated genes (treC, fimA, and mrkA) when compared to isolates treated with norfloxacin or untreated. In conclusion, this study identified a high level of MDR K. pneumoniae with strong and moderate biofilm formation abilities in pneumonic sheep and goats in Sharika Governorate, Egypt. Although cinnamon oil demonstrated potential antibacterial and anti-biofilm properties against K. pneumoniae, further research is required to investigate its effectiveness in treating K. pneumoniae infections in pneumonic sheep and goats. © 2023 by the authors. Licensee MDPI, Basel, Switzerland.