Purpose Biochar is a promising alternative for the remediation of areas contaminated by mining waste. However, depending on the pyrolysis temperature, the biochar may not be equally effective for immobilizing cationic and anionic contaminants. Our objectives in this study were to evaluate (i) the effect of biochar on arsenic (As) and lead (Pb) availabilities in sediments of a contaminated area and (ii) the effect of the biochar pyrolysis temperatures on the enzymatic activity of the microorganisms. Material and methods The contaminated sediment was sampled in an area that served as a lead ore refining plant for 10 years in Brazil. The biochar was produced from sugarcane straw (Saccharum officinarum) and pyrolyzed at 350 (BC350), 550 (BC550), and 750 degrees C (BC750). We performed an incubation experiment to investigate the effects of pyrolysis temperature on the dynamics of As and Pb in the sediment. The availabilities of As and Pb were measured by the diffusive gradients in the thin film, and the quality of organic carbon in the sediment was investigated by laser-induced fluorescence spectroscopy and UV-vis spectroscopy in solution. In addition, the effect of the application of the biochar on the microbial community was evaluated through the activities of the enzymes beta-glucosidase, acid, and alkaline phosphatase. Results and discussion The application of biochar changed the chemical composition of the carbon structures and altered the availability of As and Pb. Increases in As availability after application of biochar is directly linked to the chemical composition of the dissolved organic carbon present in BC350, with the activity of phosphatase and phosphorus release (BC550 and BC750) and, finally, with pH (B550 and BC750). The availability of Pb was reduced after the application of the B550 and B750, which suggests that pyrolyzed biochars at high temperatures may help to reduce the environmental risk associated with Pb contamination. The application of biochar reduced the activity of the enzymes beta-glucosity and acid phosphatase, while the alkaline phosphatase activity increased and was dependent on the pyrolysis temperature. Conclusions The increase in As availability after the application of the biochar is related to the chemical composition of dissolved organic carbon and the increase in phosphatase activity. The availability of Pb has been reduced due to the increase in pH, which suggests that pyrolyzed biochars at high temperatures may help to reduce the environmental risk associated with Pb contamination.