The invention relates to a preparation method of a multi-functional group antibacterial biogas residue adsorbent for adsorbing heavy metals and anions. The method comprises that with a biogas residueproduced by crop straw fuel formation and epoxy chloropropane as main raw materials, with ethylenediamine, triethylamine, hexamethylenediamine, diethylenetriamine, triethylene tetramine, or diethylaminopropylamine as cross-linking agents, the adsorbent is prepared in the presence of an N,N-dimethyl formamide medium; the prepared novel multi-functional group antibacterial biogas residue-based adsorbent has the advantages of simple production process, low cost, easy modification, large mechanical strength, wide use range, good adsorption effect, strong antibacterial property, low secondary pollution, large adsorption capacity, high adsorbing capacity specially for copper ions, nickel ions, nitrate radicals, phosphate radicals, dichromate radicals and anion dye ions, even attachment of chemical functional groups, large specific surface area and strong adhesion power. The adsorbent can be widely applied in all kinds of polluted water bodies containing various heavy metal ions and anions, such as industrial wastewater, eutrophic water bodies, chromium-containing wastewater, printing and dyeing wastewater or other polluted water bodies.