Introduction. Patients with acute respiratory distress syndrome caused by coronavirus disease 2019 (COVID-19) are at risk for superadded infections, especially infections caused by multidrug resistant (MDR) pathogens. Before the COVID-19 pandemic, the prevalence of MDR infections, including infections caused by MDR Klebsiella pneumoniae (K. pneumoniae), was very high in Iran. This study is aimed at assessing the genetic diversity, antimicrobial resistance pattern, and biofilm formation in K. pneumoniae isolates obtained from patients with COVID-19 and ventilator-associated pneumonia (VAP) hospitalized in an intensive care unit (ICU) in Iran. Methods. In this cross-sectional study, seventy K. pneumoniae isolates were obtained from seventy patients with COVID-19 hospitalized in the ICU of Shahid Beheshti hospital, Kashan, Iran, from May to September, 2020. K. pneumoniae was detected through the ureD gene. Antimicrobial susceptibility testing was done using the Kirby-Bauer disc diffusion method, and biofilm was detected using the microtiter plate assay method. Genetic diversity was also analyzed through polymerase chain reaction based on enterobacterial repetitive intergenic consensus (ERIC-PCR). The BioNumerics software (v. 8.0, Applied Maths, Belgium) was used for analyzing the data and drawing dendrogram and minimum spanning tree. Findings. K. pneumoniae isolates had varying levels of resistance to antibiotics meropenem (80.4%), cefepime-aztreonam-piperacillin/tazobactam (70%), tobramycin (61.4%), ciprofloxacin (57.7%), gentamicin (55.7%), and imipenem (50%). Around 77.14% of isolates were MDR, and 42.8% of them formed biofilm. Genetic diversity analysis revealed 28 genotypes (E1–E28) and 74.28% of isolates were grouped into ten clusters (i.e., clusters A–J). Clusters were further categorized into three major clusters, i.e., clusters E, H, and J. Antimicrobial resistance to meropenem, tobramycin, gentamicin, and ciprofloxacin in cluster J was significantly higher than cluster H, denoting significant relationship between ERIC clusters and antimicrobial resistance. However, there was no significant difference among major clusters E, H, and J respecting biofilm formation. Conclusion. K. pneumoniae isolates obtained from patients with COVID-19 have high antimicrobial resistance, and 44.2% of them have genetic similarity and can be clustered in three major clusters. There is a significant difference among clusters respecting antimicrobial resistance.