The invention discloses a method for modifying biochar, comprising: 1) pyrolyzing wheat straw and fresh whole cattail plants into biochar with limited oxygen and pulverizing them; 2) first soaking the prepared biochar in hydrogen peroxide, and then Soak in an aqueous solution of maleic acid and polyethylene glycol, cool and filter to obtain solid phase A; 3) disperse solid phase A in ethanol to form a suspension, add 2, 2, 6, 6-tetramethylpiperidine-nitrogen-oxide, methacrylic acid to obtain solid phase B; 4) solid phase B is soaked in an aqueous solution of acetic acid, and potassium periodate is added to the solution to obtain solid phase C; 5) The solid phase C was soaked in the mixture of dimethylformamide and N-methylpyrrolidone to obtain the modified biochar. The invention optimizes the modification process of biochar, adopts wheat straw and cattail as composite biochar, and optimizes the modification on the basis of the composite biochar, so that the Cd repair effect of biochar is very significant, and after being applied to cadmium-contaminated soil , significantly reducing the toxicity of heavy metals in the soil.