BACKGROUND: A significant concentration of the heavy metal Cu is found in sludge and swine manure, and excessive agricultural use of Cu can seriously inhibit plant growth. There is a critical need for an effective technology to address the issue of biotoxicity.RESULTS: This study aimed to immobilize heavy metal Cu and decrease its bioavailability by adding biochar for anaerobic co-digestion (AcoD) with swine manure and sludge. Coconut shell biochar (CSB), bamboo biochar (BC) and fruit shell biochar (FSB) were prepared by pyrolysis based on coconut shell, bamboo and fruit shell as precursors. Anaerobic co-digestion experiments were designed (sludge inoculation ratio: 20% of working volume), a biochar dosing ratio of 5% (dry weight of swine manure) and the effects on Cu immobilization and biogas production performance were investigated. CSB had a larger specific surface area (765.2 m 2 g −1 ) and more abundant surface functional groups (C O, C O, O C O, OH) than BC and FSB. CSB treatment demonstrated that the ultimate cumulative biogas production was 360.27 mL g −1 volatile solid -76.30% higher than the control (no addition). CSB addition decreased the amount of diethylenetriamine pentaacetic acid-extractable Cu to 19.75 mg kg −1 (immobilizing 75%). The correlation between environmental factors (pH, total nitrogen, total phosphorus, total organic carbon) and Cu immobilization was verified by redundancy analysis, and a positive correlation was revealed between phosphorus content and the Cu immobilization effect.CONCLUSION: This article presented comparative biochar research and contributed to assessing the environmental risk of Cu in anaerobic digestion. It guided the application of biochar for the treatment of heavy metal pollution.