Abstract To alleviate pollution and promote clean energy production, food waste can be used to produce methane through anaerobic digestion (AD). In this study, wheat straw was used to produce biochar (BC) and magnetic biochar (MB) as additives for AD of food waste. MB2.5% and BC2.5% led to the highest methane production. The main action mechanism of the additives in AD was the change in environmental factors upon stimulating microorganisms to rapidly metabolize volatile fatty acids. The stimulation of microbial function increased the abundance of the methanogenesis pathways. Methanosarcina was the most dominant archaea in the four methanogenesis modules, and the microbial community changed more clearly with time than with treatment. This study is innovative in finding the effectiveness of BC and MB treatments attributed to the abundance of methanogenesis modules, especially MB2.5% treatment retained its advantage until the later stage of digestion in AD process.