Rapid and precise identification of the pathogens causing sepsis remains a significant diagnostic challenge. Blood culture is time-consuming and insensitive, while molecular diagnostic techniques, such as the polymerase chain reaction (PCR), are fast but greatly influenced by template quality. Here, we present a new approach to separate trace amounts of pathogen DNA from blood, which utilizes lysozyme to destroy bacteria and release DNA, followed by enrichment and purification using magnetic nanoparticles (MNPs) modified with kanamycin (Kan) or tobramycin (TM). We demonstrate that the prepared Kan@MNPs and TM@MNPs can efficiently adsorb DNA, with the mechanism involving interaction with the minor groove of DNA. Notably, the adoption of lysozyme ensures bacterial lysis while avoiding damage to blood cells, minimizing the interference from human genomic DNA background and inhibitory components, thereby obtaining relatively pure bacterial DNA. For artificially infected whole blood samples, our method shortens the sample processing time to 35 min and achieves a 10-fold improvement in PCR sensitivity compared to a commercial kit. Through clinical evaluation of blood samples collected from suspected infected patients, we identified positive samples that were 100% consistent with the clinical practice. Therefore, this method holds promising potential for clinical application in advancing rapid sepsis diagnosis and earlier interventions.