A simple and novel dual-functional peptide magnetic nanoplatform has been successfully designed for sensitive detection and rapid clearance of bacterial endotoxins.