Wheat straw biochar (BC) or modified wheat straw biochar (MBC) could affect the aggregate structure of soil, effectively adsorb heavy metal and reduce the bioavailability of heavy metals in soil. TGA, BET, FTIR and SEM were used to characterize the surface morphology and structure of BC and MBC. The adsorption properties of BC and MBC on Pb(II) and Cd(II) in solution systems were investigated by batch experiments, and the remediation performance of Pb and Cd contaminated sediment by BC or MBC were studied by pot experiments. The results showed that MBC had a larger specific surface area of 46.04 m2/g and total pore volume 0.0555 cm3/g; the adsorption isotherms of Pb(II) and Cd(II) for BC and MBC were more suitable for Langmuir model (R2 over 0.91), and the maximum adsorption capacities of Pb(II) and Cd(II) by MBC could reach 71.14 and 115.64 mg/g, respectively. BC or MBC promoted the transformation of Pb and Cd from the extractable acid fraction to the oxidizable and residual fraction, reduced the migration of heavy metals and enhanced the stability of aggregates. Therefore, the results provided a perspective for the dredged contaminated sediments used as planting soil. In addition, BC or MBC, as soil amendments, could improve the abundance of microbial community. At the phylum level, the main dominant bacteria were Proteobacteria and Bacteroidetes.