The influence of heavy metals (HMs) on the anaerobic co-digestion process (AD) of activated sludge and olive mill wastewater (50% v/v) was studied. Biogas production, methane CH4 concentration, and removal efficiency of the TS, VS, and TCOD were investigated in mesophilic conditions. The toxicity and inhibitory effects of HMs at different concentrations (15–60 ppm) on the digestion process were specified.A high concentration of HMs has resulted in a significant decrease in AD performance in terms of organic load degradation, biogas production, CH4 content, TCOD removal efficiency, and inhibition of hydrogenotrophic-methanogenic bacteria. The toxicity of HMs can be arranged according to TS removal: Cu > Zn ≈ Cr > Pb, according to TCOD removal efficiency: Cu > Cr > Zn > Pb, biogas production: Cu > Zn ≈ Cr > Pb, CH4 content: Cu > Zn > Cr > Pb. Also, the results showed that the methanogenic stage was influenced negatively and more than the acetogenic stage, where Pb < 30 ppm had a lower inhibitor effect on the digestion, while the lowest concentration of Cu(II) leads to the significant inhibition of the AD process is ≥ 10 ppm. At the concentration of 60 ppm of Pb, Zn, Cr, and Cu, the COD removal efficiency was 17.07%, 15.64%, 19.13%, and 20.53% respectively, TS removal was 17.31%, 13.44%, 16.28%, and 10.37 respectively, the VS removal was 19.4%, 14.445, 7.94% and 5.17%, respectively. Also, at the concentration of 60 ppm, biogas production has decreased by 51.55%, 66.46%, 68.1%, and 73.91%, respectively.Novelty statement This study provides new data specifying the inhibitor HMs concentration and the impact of HMs at the various concentrations on the anaerobic co-digestion of active sludge and olive mill wastewater