Background Carbapenem-resistant Escherichia coli (CREC) is one of the most significant clinical pathogens, primarily emerging owing to the widespread use of broad-spectrum antibiotics. Antimicrobial resistance is a major global health challenge that prolongs treatment duration and increases healthcare costs. This study evaluated the antibacterial and anti-inflammatory effects of the antimicrobial peptide Lf-KR against CREC. Methods Broth microdilution method, growth curve analysis, and time-kill assays were performed to evaluate the antibacterial activity of Lf-KR against CREC. The working mechanism of Lf-KR was elucidated using N-phenyl-1-naphthylamine, propidium iodide fluorochrome, and lipopolysaccharide-binding assays. qRT-PCR was used to assess the peptide's effects on the expression of pro-inflammatory cytokines expression during infection. Furthermore, the safety and stability of Lf-KR were assessed by testing its cytotoxicity, hemolytic activity, and antibacterial stability under various conditions. The Galleria mellonella infection model was applied to evaluate the in vivo activity of Lf-KR. Results In vitro tests showed that Lf-KR exhibited potent antibacterial activity against CREC, with the minimum inhibitory concentrations of ranging from 4-8 mu g/mL and minimum bactericidal concentrations 4-16 mu g/mL. Mechanistically, Lf-KR induced bacterial cell death by disrupting the bacterial membrane. Furthermore, Lf-KR significantly reduced the expression of pro-inflammatory cytokine genes, including IL-1 beta, IL-6, and TNF-alpha, in RAW 264.7 macrophage cells infected with CREC. Lf-KR concentrations < 128 <mu>g/mL showed no significant cytotoxicity or erythrocyte hemolytic activity. Lf-KR antibacterial activity was stable across a wide temperature range (- 80 degrees C to 65 degrees C), although it was more susceptible to inhibition by fetal bovine serum. The G. mellonella infection model further demonstrated the robust antimicrobial activity of Lf-KR. Conclusions This study demonstrated that the antimicrobial peptide Lf-KR is a highly promising antimicrobial and anti-inflammatory agent against CREC, with potential applications in combating multi drug-resistant bacterial infections.