Background: Klebsiella pneumoniae is an important pathogen among nosocomial infections, which can cause urinary and respiratory system infections, surgical site infections, and sepsis. Recently, carbapenem-resistant K. pneumoniae showed an upward trend with the wide use of clinical carbapenem antibiotics. However, there are few studies on the relationship between drug resistance, virulence, and phylogeny of K. pneumoniae in patients with different infections. Objectives: We investigated the drug resistance, virulence, and phylogeny of K. pneumoniae in patients with different infections. Methods: Seventy infected patients were selected as subjects. The extended-spectrum β-lactamases (ESBLs) color screening plane and blood plate medium were used for culture. Identification and drug resistance analysis was carried out by VITEK-2 compact automatic bacterial analyzer. Multilocus sequence typing (MLST) and capsule genotyping analysis were also performed. The Xpert CarbaR cartridge detected the carbapenem resistance genes. Comprehensive Antibiotic Research Database (CARD) and Virulence Factor Database (VFDB) predicted the drug-resistant genes and virulence factor genes, respectively. The phylogenetic tree was constructed, and the correlation was analyzed. Results: A total of 43 K. pneumoniae strains were cultured. We found that all K. pneumoniae strains exhibited different multiple drug resistance. MLST analysis indicated that ST11 was the main ST (60.61%). Analysis of the carbapenem-resistance genes showed that all isolates harbored the blaKPC-2 gene and some others blaOXA. The prediction result of capsular blood genotyping and virulence factor genes indicated that K47, K64, and K25 were the main types of capsular blood, and the top three detection rates of virulence genes were fimH (97.67%), mrkD (94.19%), and entB (84.88%). All isolates were clustered into one branch based on the virulence factor genes in the phylogenetic tree, and the strains of the same ST type or capsular blood type showed a closer relationship. Correlation analysis manifested that the drug resistance of K. pneumoniae in infected patients was positively correlated with virulence and phylogeny (r = 0.682, P = 0.000). Conclusions: There were complicated differences in the multidrug resistance to K. pneumoniae, resulting in high independent gene-positive rates of strains and a strong correlation with phylogeny, which can provide a reference for the selection of clinical antimicrobial drugs.