Here we describe a blood-cleansing device for sepsis therapy inspired by the spleen, which can continuously remove pathogens and toxins from blood without first identifying the infectious agent. Blood flowing from an infected individual is mixed with magnetic nanobeads coated with an engineered human opsonin--mannose-binding lectin (MBL)--that captures a broad range of pathogens and toxins without activating complement factors or coagulation. Magnets pull the opsonin-bound pathogens and toxins from the blood; the cleansed blood is then returned back to the individual. The biospleen efficiently removes multiple Gram-negative and Gram-positive bacteria, fungi and endotoxins from whole human blood flowing through a single biospleen unit at up to 1.25 liters per h in vitro. In rats infected with Staphylococcus aureus or Escherichia coli, the biospleen cleared >90% of bacteria from blood, reduced pathogen and immune cell infiltration in multiple organs and decreased inflammatory cytokine levels. In a model of endotoxemic shock, the biospleen increased survival rates after a 5-h treatment.