Blood infection can release toxic bacterial lipopolysaccharides (LPSs) into bloodstream, trigger a series of inflammatory reactions, and eventually lead to multiple organ dysfunction, irreversible shock, and even death, which seriously threatens human life and health. Herein, a functional block copolymer with excellent hemocompatibility is proposed to enable broad-spectrum clearance of LPSs from whole blood blindly before pathogen identification, facilitating timely rescue from sepsis. A dipeptide ligand of histidine-histidine (HH) was designed as the LPS binding unit, and poly[(trimethylamine N-oxide)-co-(histidine-histidine)], a functional block copolymer combining the LPS ligand of HH and a zwitterionic antifouling unit of trimethylamine N-oxide (TMAO), was then designed by reversible addition-fragmentation chain transfer (RAFT) polymerization. The functional polymer achieved effective clearance of LPSs from solutions and whole blood in a broad-spectrum manner and had good antifouling and anti-interference properties and hemocompatibility. The proposed functional dihistidine polymer provides a novel strategy for achieving broad-spectrum clearance of LPSs, with potential applications in clinical blood purification.