Klebsiella pneumoniae is a pathogen that commonly causes hospital-acquired infections. Bacterial biofilms are structured bacterial communities that adhere to the surface of objects or biological tissues. In this study, we investigated the genome homology and biofilm formation capacity of ESBL-producing K. pneumoniae. Thirty ESBL-producing K. pneumoniae isolates from 25 inpatients at Ruijin Hospital, Shanghai, were subjected to pulsed-field gel electrophoresis (PFGE) to estimate genomic relatedness. Based on the chromosomal DNA patterns we obtained, we identified 21 PFGE profiles from the 30 isolates, eight of which had high homology indicating that they may have genetic relationships and/or potential clonal advantages within the hospital. Approximately 84% (21/25) of the clinical patients had a history of surgery, urinary tract catheterization, and/or arteriovenous intubation, all of which may have increased the risk for nosocomial infections. Biofilms were observed in 73% (22/30) of the isolates and that strains did not express type 3 fimbriae did not have biofilm formation capacity. Above findings indicated that a high percentage of ESBL-producing K. pneumoniae isolates formed biofilms in vitro and even though two strains with cut-off of PFGE reached 100% similarity, they generated biofilms differently. Besides, the variability in biofilm formation ability may be correlated with the expression of type 3 fimbriae. Thus, we next screened four ESBL-producing K. pneumoniae isolates (Kpn5, Kpn7, Kpn11, and Kpn16) with high homology and significant differences in biofilm formation using PFGE molecular typing, colony morphology, and crystal violet tests. Kpn7 and Kpn16 had stronger biofilm formation abilities compared with Kpn5 and Kpn11. The ability of above four ESBL-producing K. pneumoniae isolates to agglutinate in a mannose-resistant manner or in a mannose-sensitive manner, as well as RNA sequencing-based transcriptome results, showed that type 3 fimbriae play a significant role in biofilm formation. In contrast, type 1 fimbriae were downregulated during biofilm formation. Further research is needed to fully understand the regulatory mechanisms which underlie these processes.