1 Introduction

As an unavoidable problem in the treatment of textile dyeing wastewater, textile dyeing sludge (TDS) is called as a “time bomb” that may cause long-term environmental pollution (Han et al. 2021; Zhou et al. 2019a, b). TDS contains more toxic organics, heavy metals (such as zinc, lead, and chromium) than sewage sludge (Man et al. 2018; Xie et al. 2018). Therefore, the follow-up treatment of TDS is a sensitive environmental issue. A large amount of TDS has been mainly used for subsequent disposal through land use, landfill, and incineration (Xie, et al. 2018). Due to the limited construction of landfills and the risk of groundwater pollution, incineration has also a high potential for secondary pollution risks, and it was gradually banned because it does not conform to the trend of green development in the future (Wang et al. 2019a, b). At present, the new direction of sludge resource utilization is to prepare sludge-based biochar for soil remediation through pyrolysis in an anaerobic environment.

Soil heavy metals pollution has become one of the focal points of widespread concern in the world. With the increase in industrial activities (mining, metal processing) and excessive agricultural inputs (phosphate fertilizers, pesticides), heavy metals have widely leached into the soil environment (Wang et al. 2019a, b). Owing to the toxicity, non-biodegradability and bioaccumulation of Cd and Pb, human health and ecosystem were serious threatened (Lian et al. 2019; Yang et al. 2021). Excessive Cd in the soil could directly affect food crops and further through the food chain potential harm to higher organisms (Wang et al. 2021a, b, c, d2020a, b). Pb may have a toxic effect on the human immune system. Each year, Pb poisoning is responsible for more than 600,000 children intellectual disabilities in the world (Palansooriya et al. 2020). Therefore, it is urgent to find a cost-effective method to immobilize heavy metals such as Cd and Pb.

At present, the remediation technology of heavy metals contaminated soil mainly includes three categories: physical, biological, and chemical method (Lan et al. 2021). Among them, biochar immobilization and stabilization has been used extensively because of the characteristics of biochar, such as large specific surface area, huge pore volume, good stability, and abundant surface functional groups (Yang et al. 2020; Zhang et al. 2020a, b). In addition, biochar contains nutrients such as nitrogen and phosphorus, which can improve soil fertility while remediating heavy metals (Tomczyk et al. 2021). Traditional biochar is commonly prepared from agricultural waste, forestry waste, and animal manure (Irfan et al. 2021). Due to the possibility of the secondary pollution of sludge-based biochar, there has been a great controversy in the research of sludge-based biochar, especially the preparation of biochar from TDS for remediation heavy metals contaminated soil has rarely been reported. However, most of the sludge-based biochar has a large-specific surface area and superior adsorption performance (Jin et al. 2016), which cannot only solve the sludge reuse problem but also provide a feasible solution for soil heavy metals remediation.

Biochar preparation from sewage sludge gradually became an emerging treatment method for remediation of soil heavy metals pollution. Biochar immobilize soil heavy metals mainly through surface adsorption, ion exchange, co-precipitation, and complexation (Rinklebe et al. 2020). Wang et al. studied the effect of sewage sludge biochar on the immobilization of Pb (II), Cu (II), and Zn (II) in sandy loam soils using DTPA and BCR sequential extraction methods, and found that the addition of sludge biochar converted the metals in the mobile state to the relatively stable state in the soil (Wang et al. 2021a, b, c, d). Velli et al. studied the effect of sludge biochar on tomato growth; nutrient and heavy metals content illuminated that the addition of biochar significantly changed soil chemistry and that both As (V) and Pb (II) concentrations in the plants were reduced (Velli et al. 2021). To improve the adsorption capacity of biochar, careful selection of pyrolysis temperature and modification method are the key factors (Gai et al. 2014; Wang et al. 2021a, b, c, d). Park et al. investigated that biochar prepared at pyrolysis temperature of 600℃ could maximize Cd adsorption (Park et al. 2019). The commonly used modification methods include chemical modification, physical modification, and magnetic modification (Lyu et al. 2020; Wu et al. 2020). Zhou et al. developed an iron-manganese binary oxide-biochar composite (FMBC) to repair Cd-contaminated soil, which is one of the most promising remediation materials to mitigate the risk of Cd contamination (Zhou et al. 2019a, b). In addition, some researches revealed that the addition of biochar can change the soil microbial communities, and thus positively affect soil heavy metals remediation (Zhang et al. 2018), but when studying the changes of biochar on soil microbial community structure and diversity, the effects of soil physicochemical properties (pH, TOC, etc.) and heavy metals speciation are not considered comprehensively. However, the soil environment (such as pH, microbial communities, and other inorganic components) are complex, comprehensive consideration is often required in soil heavy metals pollution control. Moreover, most of these studies focus on the soil systems with single heavy metal pollutants (Li et al. 2019), so it is necessary to research whether and how biochar can stabilize the co-contamination of Cd and Pb in soil. In general, numerous studies have been done on the addition of sewage sludge biochar for soil heavy metals remediation, and whether textile dyeing sludge-based biochar can be used to achieve the effect of treating waste with waste.

Currently, the textile dyeing sludge–based biochar (TDSBC) and magnetically modified biochar (MTDSBC) were pyrolyzed at 500℃ for 2 h, and the immobilization mechanism of Cd and Pb in a paddy soil for 60 days was explored from the perspective of microorganisms. The objectives of this study are as follow: (i) to determine the influence of TDSBC and MTDSBC on soil properties; (ii) to illustrate the effects of TDSBC and MTDSBC on the available state content and speciation of Cd and Pb by DTPA and BCR methods; (iii) to illuminate the changes of soil microbial structure and community by high-throughput sequencing of 16S rRNA, and discuss the microbial immobilization mechanism of Cd and Pb.

2 Materials and methods

2.1 Soil and biochar

The soil was collected at a depth of 0–20 cm from a paddy field in Songjiang District, Shanghai, China. The properties of the soil are listed in Table 1. Soil was air-dried under natural conditions, crushed, ground, and homogenized through a 60-mesh sieve before use. Cadmium chloride (CdCl2) and lead chloride (PbCl2) were added to the homogenized soil to make the concentrations of Cd and Pb to 50 mg/kg and 100 mg/kg, respectively (Wang et al. 2022). The Cd–Pb composite contaminated soil was left at 25℃ for 1 week to reach equilibrium, and then it was air-dried, crushed, and passed through a 20-mesh sieve.

Table 1 General properties of the textile dyeing sludge, the two biochar and the soil

TDS was taken from textile printing sewage treatment plant in Suzhou, Jiangsu Province, China. The sludge was air-dried, crushed, sieved, and passed through a 60-mesh sieve to be crushed and set aside. The detailed producing procedure was given in previous study (Wang et al. 2021b, c, d, a). Briefly, magnetic modification was pretreated by immersed in a mixture of FeSO4 and Fe2(SO4)3 (molar ratio 2:1, Fe(II) 0.1 mol/L) for 30 g TDS, stirred vigorously for 30 min, and then loaded Fe3O4 through raising pH (11 − 12) with 5 mol/L NaOH addition. The sludge was pyrolyzed at 500℃ under N2 gas for 2 h to obtain biochar with relative higher surface area and lower cost performance (Li et al. 2021; Wang et al. 2020a, b). The biochar prepared from the sludge without and with pretreatment were labeled as TDSBC and MTDSBC, respectively. Fourier transform infrared spectroscopy (Nicolet6700, Thermo, USA) was used to analyze biochar surface characteristics of functional groups. The content of C, H, and N of biochar were determined by Elemental analyzer (Elementar vario EL cube, Germany). A fully automatic rapid specific surface and porosity analyzer (Autosorb-iQ, Quadrasorb, USA) determines the specific surface area of biochar.

2.2 Incubation experiments and analysis

To determine the impact of biochar on the speciation of Cd and Pb and indigenous microbial communities in the soil, a 60-day incubation experiment was carried out in a constant temperature incubator at 25℃ to maintain 70% moisture. Each treatment was performed using 60 g air-dried Cd–Pb-contaminated soil. The addition amount of TDSBC were 1%, 3%, 5% (W/W) and MTDSBC was only 5% (W/W). Among them, 1%, 3%, and 5% TDSBC were used to discuss different addition levels, while MTDSBC was used to compare the effects of different biochar on the immobilization of Cd and Pb. According to the Soil Environmental Quality Risk Control Standard for Soil Contamination of Agricultural Land (GB15618-2018) in China, the Cd and Pb content of both TDSBC and MTDSBC were lower than the allowable critical value of soil environment. The non-treated soil served as control and marked as Blank. Throughout the incubation period, soil was sampled on the 0, 7, 15, and 30 days for analysis of pH, TOC, DTPA-Cd, DTPA-Pb, and the speciation of Cd and Pb. Fresh soil samples (about 2 g dry weight for each sample) was used for Cd and Pb fractions analysis. The extraction steps used in this study are described by Chen et al. (Chen et al. 2016). The extraction and testing process were repeated three times to improve the accuracy of the experimental processes. The pH values of soil and biochar were determined using a pH meter in a 1:20 (w/v). The content of soil organic carbon was determined by TOC Analyzer (Multi3100, JENA, Germany). DTPA was used to extract the available state content of Cd and Pb (Umoren et al. 2007). The speciation of Cd and Pb was extracted by BCR continuous extraction method (Quevauviller et al. 1997). The contents of Cd and Pb in all extracting samples were measured by atomic absorption spectrophotometer (Z-2000, Hitachi, Japan).

2.3 High-throughput sequencing and analysis

Samples from the Blank group incubated for 0 days and addition with 5% TDSBC/5% MTDSBC incubation for 60 days were used for microbiological analysis. QIAamp (QIAGEN, 51,504) kit was used for DNA extraction of soil samples, and Nanodrop 2000 was used to detect the DNA extraction quantity and purity. 338F (ACTCCTACGGGAGGCAGCAG) and 806R (GGACTACHVGGGTWTCTAAT) targeting both archaea and bacteria were used as primers for 16S rRNA amplification. The data were analyzed on the free online platform of Majorbio Cloud Platform (www.majorbio.com). The amplified samples were sequenced, and the data were processed to remove bad sequence data and detect suspicious chimeras to obtain high-quality bacterial sequence data. To enhance the comparability between samples, OTU clustering was performed based on the similarity between sequences (similarity > 97%), Shannon index, community composition analysis, and principal component analysis (PCA) were performed on the data. The raw sequencing date have been uploaded into the NCBI database Sequence Read Archive (SRA) and the accession number are SUB 11,251,134.

3 Results and discussion

3.1 Characterization of the TDSBC and MTDSBC

The physicochemical properties of TDSBC and MTDSBC are shown in Table 1. The physical adsorption capacity of biochar was significantly correlated with the specific surface area. The larger the specific surface area of biochar means that the more adsorption sites, and the soil microorganisms had a better habitat (Atkinson et al. 2010). Compared with the specific surface area of MTDSBC (63.1 m2/g), TDSBC performed a large specific surface area of 102.97 m2/g. It can be inferred that TDSBC had a better adsorption of pollutants in the soil, and the degree of pollution reduction by MTDSBC may not be as good as TDSBC. The aromaticity and polarity of the material are represented by the H/C ratio and (O + N)/C, respectively (Schimmelpfennig and Glaser 2012). The ratio of O/C and (O + N)/C of MTDSBC was higher than TDSBC, indicating that MTDSBC had better hydrophilicity and more polar functional groups than TDSBC (Wu et al. 2018). The high pH value of MTDSBC may attributed to the high ash content (Denyes et al. 2014).

The infrared spectrum results of both biochars were shown in Fig. 1. In the FTIR spectra, the peaks at 3440 cm−1, 2824 cm−1, 1633 cm−1, and 1400 cm−1 correspond to − OH, –CH2, − R-CH = O, and − COOH respectively (Huang et al. 2017; Peng et al. 2011). The functional groups attached to the surface of both biochars had no significant difference. However, the new strong absorption peak of MTDSBC at 1074 cm−1 was the stretching vibration of phenolic C-O and the peak at 621 cm−1 was the stretching vibration of Fe–O. This has demonstrated that MTDSBC has more functional groups and the iron oxides were successfully fixed on the surface of MTDSBC (Liu et al. 2015).

Fig. 1
figure 1

FTIR spectra of TDSBC and MTDSBC

3.2 Soil pH and TOC

On the 7th day of soil incubation experiment, the soil pH increased in all conditions (Table 2). For TDSBC, the soil pH changed with increasing the addition of biochar, which increased from 8.03 to 8.46 when the amount of biochar added increased from 1 to 5%. Due to the formation of carbonates (e.g., CaCO3 and MgCO3) during pyrolysis and carbonization of TDS (Lehmann et al. 2011; Li et al. 2018a, b; Wang et al. 2017), which increased soil pH. After 60 days of the incubation experiment, pH was slightly higher than that of the Blank group. Knoblauch et al. demonstrated that biochar had a relatively small effect on pH in neutral soils, which was consistent with our conclusion (Knoblauch et al. 2011).The increase of soil pH enhanced the adsorption and complexation of heavy metals ions in soil, which was conducive to reducing the content of heavy metals in soil (Chong et al. 2005). In addition, dominant genera were affected by pH. For example, alkalophilic bacteria grow best around pH 9, which was significantly correlated with the bioavailability of heavy metals. At the same 5% biochar addition amount, the addition of MTDSBC increased soil pH more than TDSBC during the 60 days of incubation experiment. In the pyrolysis process of TDS to prepare MTDSBC, the decomposition of acidic functional groups such as carboxyl group and phenolic hydroxyl group and the volatilization of organic acids may be more than that of TDSBC (Wang et al. 2021a, b, c, d), which makes the pH of MTDSBC higher and thus increases the pH of soil.

Table 2 pH and TOC under different treatments on incubation

Total organic carbon in the soil is an important component of organic matter, which can provide energy for animal and plants growth. The addition of 5% TDSBC and 5% MTDSBC can remarkably increase the TOC content of the soil (Table 2). Compared with the Blank group, TOC content of 5% TDSBC increased from 16.85 to 24.34 g/kg soil after 7 days of incubation. After 60 days of incubation, the TOC content tend to be stable in the soil. This result was consistent with Wang et al. who used double rice cropping as the research object and found that the addition of straw biochar increased TN, TOC, and rice biomass and significantly increased bacterial and fungal abundance (Wang et al. 2021a, b, c, d). In general, the TOC content of TDSBC has increased more than that of MTDSBC, which also provides a theoretical basis for the subsequent microbial diversity analysis.

3.3 Available content of Cd and Pb

The Cd and Pb available state content were extracted of by DTPA and the results are shown in Fig. 2. Compared with 0 days of incubation, DTPA-Cd and DTPA-Pb in the Blank group had a little change within 60 days, suggesting that the soil had little self-healing capacity for immobilization of Cd and Pb. The results demonstrated the necessity of manual intervention to repair soil heavy metal pollution. In all incubation groups, DTPA-Cd and DTPA-Pb decreased rapidly during the 7 days of incubation, the reduction rate of Cd and Pb available state content decreased with increasing incubation time. Specifically, the immobilization effects of TDSBC and MTDSBC on Cd and Pb were not significantly different at the same 5% biochar addition, with the DTPA-Cd reduced by 75.99% and 75.69%, and the DTPA-Pb reduced by 81.17% and 80.95%, respectively. The main reason may be that biochar had a larger specific surface area, which can enhance the air permeability of the soil and provide a suitable soil environment for the microorganisms (Zhang et al. 2010). Moreover, the BET specific surface area of MTDSBC was 40% smaller than that of TDSBC because the FeOx covered the surface of MTDSBC and occupied the adsorption sites on the biochar surface to some extent (Tan et al. 2017), but FeOx could immobilize heavy metal ions by outer layer complexation, inner layer complexation, and interface precipitation. Hence, although MTDSBC had a fewer adsorption sites for Cd and Pb than TDSBC, it could also immobilize Cd and Pb in soil and provide the possibility for subsequent separation.

Fig. 2
figure 2

Effects of TDSBC and MTDSBC on the available content of a Cd and b Pb

3.4 Speciation and transformation of Cd and Pb

The distribution and immobilization mechanism of Cd and Pb in paddy soil were determined by BCR sequential extraction method to extract acid-soluble (F1), reducible (F2), oxidizable (F3), and residue (F4) state (Quevauviller et al. 1997). The main form of Cd were acid-soluble and reducible states, at 0 days of incubation (Fig. 3), which partly reflects the toxicity of heavy metals and was easily absorbed by plants (Liu et al. 2020). The residual was the most stable state of heavy metals in the soil, and had the crystalline structure of soil minerals, which cannot be utilized by plants (Xu et al. 2016). After biochar was applied to soil incubation experiment for 60 days, the acid-soluble state content of Cd was significantly reduced and the residue content increased, indicating a decline in the bioavailability of potentially toxic elements were starting to drop. With the increase of TDSBC dosage from 1 to 5%, the immobilized heavy metals became better. When TDSBC and MTDSBC were added at the same 5% after 60 days of incubation, compared with 0 days of incubation, the acid-soluble of Cd was reduced by 52.14% and 47.02%, and the residue state was increased by approximately 10 times and 8 times. This variation pattern was identical to the findings of  (Wang et al. 2020a, b). The immobilization effect of MTDSBC on Cd was not as strong as that of TDSBC. The reason may be that TDSBC remarkably improved the TOC content in the soil, provided more carbon sources for microorganisms, and increased microbial activity and community diversity.

Fig. 3
figure 3

Effects of TDSBC and MTDSBC on soil Cd fraction (F1: acid-soluble; F2: reducible; F3: oxidizable; F4: residual)

Similar to Cd, the more stable form (F3 + F4) of Pb generally increased with increasing the addition of TDSBC and soil incubation time, while the unstable form (F1 + F2) was reduced as compared to Blank group (Fig. 4). After 60 days of incubation, when TDSBC was added at 1%, 3%, 5% (W/W), the unstable forms (F3 + F4) of Pb were 93.2, 95.3, and 96.4 mg/kg in soil, respectively. Lan et al. found that the bioavailability of heavy metals decreases with increasing incubation time and the addition of biochar (Lan et al. 2021). Moreover, the immobilization effect of MTDSBC on Pb was still inferior to that of TDSBC. For example, relative to 0 days of incubation, after 60 days of incubation with 5% TDSBC, the acid-soluble content of Pb was reduced by 79.85%, and the residue content increased to 54.25 mg/kg, while the addition of 5% MTDSBC, the acid-soluble content of Pb decreased by 68.74% and the residue content increased to 44.59 mg/kg. TDSBC had a larger specific surface area and can be more tightly combined with the soil and come into contact with heavy metal ions, resulting in a series of physical and chemical adsorption (Li et al. 2018a, b). In addition, the FeOx covered on the surface of MTDSBC and caused relatively poor soil aggregation, which in turn weakened its ability to immobilization heavy metal ions (Tan et al. 2017). However, MTDSBC provides the possibility of further magnetic separation.

Fig. 4
figure 4

Effects of TDSBC and MTDSBC on soil Pb fraction (F1: acid-soluble; F2: reducible; F3: oxidizable; F4: residual)

3.5 Microbial community structure and diversity analysis

Shannon index curve reflected the variation of species diversity of soil sample with the amount of sequencing. Shannon index increased significantly (from 5.69 to 6.32) after the addition of 5% TDSBC incubation 60 days, reflecting the increase in the diversity of microorganisms in the soil, which verified the soil TOC content increased significantly and provided more carbon sources for microorganisms. However, the Shannon index in the soil samples added with 5% MTDSBC was no remarkable difference (from 5.67 to 5.69), indicating that MTDSBC had a little effect on microbial diversity. FeOx was attached to the pore structure of MTDSBC, resulting in the lack of microbial reproduction (Rajapaksha et al. 2016). In addition, MTDSBC slightly increased the soil TOC content, providing relatively less nutrients and carbon sources as compared with TDSBC.

Soil microbial composition was similar in the incubation group with 5% TDSBC and 5% MTDSBC at the phylum level (Fig. 5a). Proteobacteria, Actinobacteriota, Firmicutes, Chloroflexi, and Bacteroidota were dominant phyla. Proteobacteria were the dominant bacteria phyla in heavy metal polluted soil environments (Jiang et al. 2019); Firmicutes can produce endospores with resistant structures in contaminated soil and was a metal-tolerant species (Fajardo et al. 2018), Bacteroidota showed strong tolerance in moderately contaminated soil (Lin et al. 2019). Compared with the Blank group, the relative abundance of Proteobacteria, Firmicutes, and Bacteroidota in the 5% TDSBC and 5% MTDSBC incubation groups was significantly reduced. Among them, the relative abundance of Bacteroidota in 5% TDSBC and 5% MTDSBC groups was 11.87% and 6.06% lower than that in the Blank group, respectively. The number of tolerant species was reduced in both biochars incubation groups, indicating an improved soil bacterial community, which confirm the reduction in the available state of Cd and Pb in the soil. It was found that Actinobacteriota was negatively correlated with Cd content in the soil (Zhu et al. 2013), and Chloroflexi increases soil organic carbon fraction, promotes soil respiration, and reduces heavy metal contamination through extracellular precipitation, enzymatic oxidation, cell wall adsorption, and intracellular complexation (Zhang et al. 2020a, b). The relative abundance of Actinobacteriota and Chloroflexi increased in the 5% TDSBC and 5% MTDSBC groups. Compared with the Blank group, the relative abundance of Chloroflexi in soil nearly doubling (from 8.76 to 15.37% and 15.05%), reflecting the reduction of Cd and Pb pollution.

Fig. 5
figure 5

Effects of TDSBC and MTDSBC on the relative abundance of soil microorganisms (a phylum level; b genus level)

Figure 5b further reflects the relative abundance of microorganisms in different treated soils (5% TDSBC/5% MTDSBC) at the genus level. The main bacterial genera that showed significant changes were Thiobacillus, Massilia, and Pseudarthrobacter. The available content of Cd in the soil with 5% MTDSBC decreased by 54.17% compared with Blank after 60 days of incubation. Thiobacillus had high metal tolerance and good adsorption performance to Cd(II), Zn(II), and Pb(II) metal ions in water (Celaya et al. 2000). The relative abundance of Thiobacillus was only 0.07% in the Blank group, which increased to 5.07% and 10.61% in the 5% TDSBC and 5% MTDSBC incubation groups, respectively. The increase of Thiobacillus indicated that Cd and Pb in the soil had a better immobilization effect. Massilia was prevalent in the Cd-contaminated soil and had a strong correlation with the removal rate of heavy metals (Xu et al. 2020). In this study, the relative abundance of Massilia was remarkably reduced (from 12.18 to 1.28%) after the addition of 5% TDSBC, which was speculated to be negatively correlated with the contents of Cd and Pb. Pseudarthrobacter can accumulate Cd through intracellular and extracellular chelation, the higher number of Pseudarthrobacter indicated less Cd pollution (Hrynkiewicz et al. 2015). The addition of 5% TDSBC and 5% MTDSBC promoted the enrichment of Pseudarthrobacter, which chelated more Cd and reduced heavy metal pollution in the soil.

When discussing the change of microbial community composition, it is difficult to obtain different information from a simple community structure diagram. Hence, PCA was used to explore similarities and differences of the microbial community composition (Ji et al. 2020a, b) (Fig. 6). The black arrow in the figure represents the changing trend of the genus, and the red and blue dots represent the distribution of the community composition of 5% TDSBC and 5% MTDSBC treatments, respectively. For the addition of 5% TDSBC, PCA analysis could explain 88.70% and 85.37% bacterial population changes at the phylum and genus level, respectively. At the phylum level (Fig. 6a and c), compared with the Blank group, the species and abundance of microorganisms in the 5% TDSBC and 5% MTDSBC incubation groups were not different, and the relative abundance in the direction of Bacteroidota was low, while the relative abundance in the direction of Actinobacteriota was high. Lin et al. found that Bacteroidota showed high tolerance in lightly contaminated soils (Lin et al. 2019). Zhu et al. clarified that the increase of Actinobacteriota was negatively correlated with the Cd available content in the soil, indicating that the toxicity of soil Cd after biochar treatment decreased (Zhu et al. 2013). At the genus level (Fig. 6b, d), compared with the Blank group, the relative abundance of Thiobacillus was higher in 5% TDSBC and 5% MTDSBC incubation groups. Ye et al. added both biochar and Thiobacillus to Pb-contaminated soil, and found that the relative abundance of Thiobacillus increased significantly and had good adsorption capacity for Pb (Ye, et al. 2020). The changes of genera are consistent with the trends in the available state and speciation of Cd and Pb.

Fig. 6
figure 6

Principal component analysis of TDSBC and MTDSBC (a TDSBC phylum level; b TDSBC genus level; c MTDSBC phylum level; d MTDSBC genus level)

4 Conclusions

Present study based on incubation experiments demonstrated the immobilization mechanism of Cd and Pb in a paddy soil by TDSBC and MTDSBC from the perspective of metal speciation and microbial community, combined with soil physicochemical properties. As compared with TDSBC, MTDSBC had the smaller specific surface area, increased the number of functional groups, and iron oxides were successfully fixed on the surface of MTDSBC. The addition of TDSBC and MTDSBC to Cd–Pb composite contaminated soil increased soil pH and TOC. Increased soil pH during incubation promoted surface complexation reactions and reduced the available and acid-soluble state content of Cd and Pb, while the percentage of metal conversion to residual state in the acid-soluble state was higher in the 5% TDSBC incubation group than in the 5% MTDSBC. Increased soil TOC content provided more carbon sources for microorganisms and affected microbial community structure and diversity. Specifically, compared with the Blank group, the relative abundance of Actinobacteriota and Thiobacillus in the 5% TDSBC and 5% MTDSBC incubation groups increased, which were negatively correlated with the available content of Cd and Pb. And the reduced relative abundance of Bacteroidota was positively correlated with the Cd and Pb available content. In general, MTDSBC was slightly less effective than TDSBC in immobilizing Cd and Pb, but MTDSBC could provide the possibility for subsequent biochar recovery. Therefore, it was feasible to prepare magnetic modified biochar by TDS for immobilization of heavy metals in the soil.