In this study, we investigated the effects of the physical and chemical properties of sludge and the bioavailability of heavy metals in the composting process of municipal sludge by adding earthworms and different biochar in the composting process. The study showed that compared with sludge composting alone, the combined sludge composting with earthworms increased pH, EC, TN and TP contents by 2.49%, 36.49%, 9.32% and 4.53%, respectively, while the OM content was significantly reduced by 15.67%; the combined sludge composting with biochar significantly increased pH and TP contents, and significantly reduced EC, OM, and TN contents; and the combined sludge composting with earthworms and biochar resulted in a significant reduction of pH, OM and EC, OM and TN contents. pH, OM, EC, TN, and TP were significantly reduced and increased, respectively. The bioavailability of Cu, Cd, Ni, and Pb showed a decreasing trend compared with CK after vermicomposting with earthworms alone, and the bioavailability of Cd, Ni, and Pb were significantly reduced after vermicomposting with earthworms-biochar (except Cu). Compared with the addition of rice husk charcoal, the addition of bamboo charcoal and sludge composting had a more significant effect on the reduction of heavy metal bioavailability; the addition of earthworm-biochar co-composting further reduced the bioavailability of heavy metals in sludge (except Cu). This study showed that by adding earthworms and biochar to the composting system, the nutrient elements and physicochemical properties of municipal sludge were improved, which was conducive to the passivation of heavy metals in the sludge, and the municipal sludge was stabilized, and there was a correlation between the two, which provided a new approach and method for the bio-composting treatment of municipal sludge.