Co-pyrolysis with other biomass is a promising method for municipal sludge treatment and has attracted great attention. However, the dominant mechanism by which the heavy metals in municipal sludge are immobilized during the co-pyrolysis remains unknown. In this study, municipal-sludge biochar was prepared by pyrolysis and co-pyrolysis, and the effects of pyrolysis temperature (400-800 ℃) and the addition of shaddock peel on the properties of biochar, the contents of heavy metals (Cu, Zn, Pb, Cd, Ni, and Cr), and their environmental risks were investigated. Based on the analysis of characterization results and heavy metal contents in the biochar, it was observed that co-pyrolysis promoted the formation of stabilized crystalline minerals (e.g., CdPbO