Co-combustion of sewage sludge (SS) and coal slime (CS) is the ideal approach for treating low-calorific-value waste. However, the emission of heavy metals (HMs) during combustion restricts their efficient utilization. The migration and transformation of HMs (Pb, Cd, Zn, Cu, Cr, Ni) during the co-combustion of SS and CS at 700-1000 degrees C were quantitatively studied by combining DFT (density functional theory), thermodynamic analysis and combustion experiments. The results showed that the interactions between SS and CS reduced the volatilization of HMs, with the strongest solidification effect at 900 degrees C. The enrichment rates of Pb, Cd, Zn, and Cu after co-combustion were 5.30 %, 6.30 %, 6.40 %, and 4.20 % higher than theoretical values, respectively. In-situ solidification of HMs occurred through physical and chemical pathways. The physical pathway involved melting of aluminosilicate, reducing HMs volatility by creating a covering effect. The chemical pathway involved minerals in SS and CS reacting with HMs, solidifying them in bottom ash. KH2PO4 in SS reduced volatilization of Zn and Pb by forming ZnPO4(s) and PbPO2(s), while sulfides in CS reacted with Zn and Pb to prevent volatile chlorides. Kaolinite in SS and CS transformed into metakaolin at high temperatures, facilitating the solidification of Pb and Cd with adsorption and heterogeneous reactions. DFT calculations showed that metakaolin, acting as a Lewis acid, facilitated oxidation of PbCl2 and PbO, which acted as Lewis bases, with corresponding adsorption energies of -1.90 eV and -4.44 eV. This study is vital for improving low-calorific-value solid waste treatment and solidifying HMs in situ.