The preparation of biochar typically involves the pyrolysis of waste organic biomass. Iron-rich magnetic biochar not only inherits the characteristics of high specific surface area and porous structure from biochar but also possesses significant advantages in easy separation and recovery, which has shown great application potential in various fields such as soil improvement and water resource remediation. This study aims to explore the influence of mineral iron on the carbon sequestration capability of biochar during the pyrolysis process. Experiments were conducted by using spent mushroom substrates as raw materials to prepare biochar at different temperature intervals (300 to 600 °C). The addition of exogenous iron has been found to significantly enhance the carbon retention rate (12.2–44.5%) of biochar across various pyrolysis temperatures and, notably, improves the carbon stability of biochar at 300 °C, 400 °C, and 600 °C. Through the analysis of thermogravimetric mass spectrometry (TG-MS) and X-ray photoelectron spectroscopy (XPS), we discovered that iron catalyzes the thermochemical reactions and inhibits the release of organic small molecules (C2-C5) through both physical blocking (FexOx) and chemical bonding (C=O and O-C=O). The results of Raman spectroscopy and infrared spectroscopy analyses indicate that the addition of iron significantly promotes the graphitization process of carbon and enhances the thermal stability of biochar within the temperature range of 300 to 500 °C. When exploring the retention and stability of carbon during pyrolysis, it was found that under the conditions of 600 °C and the presence of iron, the maximum carbon sequestration rate of biochar can reach 60.6%. Overall, this study highlights the critical role of iron and pyrolysis temperature in enhancing the carbon sequestration capacity of biochar.