The effect of earthworms on the immobilization of heavy metals by biochar was investigated using 4-week soil pot experiments. Our results showed that both sludge and rice husk biochars applied to Cd, Pb and Zn contaminated soils significantly reduced the bioavailability of those heavy metals in soils, and their concentrations in soil pore water. The Cd and Pb concentrations in pakchoi shoots were decreased by 10.8%–11.7% and 21.5%–26.5%, respectively, in biochar treatments alone. Biochar and earthworm treatments, alone or in combination, can significantly increase pakchoi growth. However, compared with biochar-treated alone, applying earthworms into pots with biochar treatments significantly reduced soil pH by 0.1–0.19 units, increased the Cd, Pb and Zn concentrations in soil pore water, their bioavailability and total uptake in shoots. Additionally, earthworms weaken the immobilization effect of biochar on heavy metals. The results of principal component analysis and correlation analysis showed that earthworm treatment was the main cause of soil pH reduction, and soil pH was significantly negatively correlated with the bioavailable Cd, Pb and Zn concentrations in the soil. Furthermore, the effect of the earthworm digestive system (casts) on bioavailable Cd, Pb and Zn concentrations could not explain their changes in the soil. In addition, the application of biochar had no significant effect on the survival and heavy metal enrichment of earthworm. Therefore, the effect of earthworms must be considered in the process of Cd, Pb and Zn contaminated farmland soil remediation using biochar.