Abstract The routine identification of pathogens during infection remains challenging because it relies on multiple modalities such as culture and nucleic acid amplification and tests that tend to be specific for very few of an enormous number of possible infectious agents. Metagenomics promises single-test identification, but shotgun sequencing remains unwieldy and expensive or in many cases insufficiently sensitive to detect the amount of pathogen material in a clinical sample. Here we present the validation and application of Castanet , a method for metagenomic sequencing with enrichment that exploits clinical knowledge to construct a broad panel of relevant organisms for detection at low cost with sensitivity comparable to PCR. Castanet targets both DNA and RNA, works with small sample volumes, and can be implemented in a high-throughput diagnostic setting. We used Castanet to analyse plasma samples from 573 patients from the GAinS sepsis cohort and CSF samples from 243 patients from the ChiMES meningitis cohort that had been evaluated using standard clinical microbiology methods, identifying relevant pathogens in many cases where no pathogen had previously been detected. Castanet is intended for use in defining the distribution of pathogens in samples, diseases and populations, for large-scale clinical studies and for verifying the performance of routine testing regimens. By providing sequence as output, Castanet combines pathogen identification directly with subtyping and phylo-epidemiology.