This study presents a strategic method to improve carbon utilization in agricultural waste, specifically spent mushroom substrate (SMS), while valorizing metal-rich waste, red mud, through pyrolysis platform. To offer sustainability, CO2 was utilized as reaction medium. The utilization of CO2 in SMS pyrolysis promotes syngas production, particularly CO, through homogeneous reactions (HRs) with volatile compounds (VCs). Indeed, the amount of syngas in N-2 and CO2 were 2.42 and 4.04 mmol g(sms)(-1) , respectively. The inclusion of red mud in CO2-mediated pyrolysis of SMS accelerated the reaction kinetics of HRs lined to CO2, resulting in enhanced syngas production. The iron-functionalized biochars (Fe-FBs) produced at 700 degrees C in N-2 and CO2 were evaluated for Cr (VI) removal. Faster kinetics for Cr(VI) removal was observed in Fe-FB in N-2 compared with that in CO2. This is likely due to the higher capability of elemental iron (Fe-0) in reduction of Cr(VI). However, Fe-FBs in CO2 exhibited superior adsorption capacities relative to that in N-2, indicating that Fe3O4 is a primary contributor to Cr (VI) removal through adsorption. Notably, removal of Fe-FBs in N-2 and CO2 via adsorption reached up to 17.2 and 82.8 %, respectively. Considering toxic nature of Cr species (Cr(VI) and Cr(III)), their immobilization through adsorption on Fe-FBs in CO2 may offer a more environmentally benign strategy. These findings suggest that the pyrolysis of SMS with red mud using CO2 as a reactant provides two benefits: enhanced syngas production and the fabrication of Fe-FBs that can serve as environmentally benign materials for Cr(VI) removal.