Pyrolysis-based valorization of sewage sludge (SS) is limited by the low surface area and elevated ecological risk of the resulting biochar. This study investigated ternary co-pyrolysis of arecanut husk (ANH), municipal SS, and red mud (RM) in a fixed-bed reactor under N2 and CO2 atmospheres at 500–600 °C, to increase biochar surface area, lower heavy-metal ecological risk, and enhance hydrogen production. ANH supplied a lignocellulosic meso-channel template and high volatile matter (65.8 wt%), while RM (Fe2O3 ≥ 62 wt%) catalyzed pore development and helped immobilize heavy metals originating from SS. At the optimum condition (15% RM, N2, 500 °C), biochar surface area reached 184.6 m2/g, 2.71 times greater than the pure-SS baseline (68.2 m2/g); CO2 activation at 600 °C increased this further to 224.8 m2/g. The Hakanson Ecological Risk Index fell from 495.4 (pure SS) to 98.6 at 15% RM, meeting the EU Biochar Certificate threshold (RI < 150) for unrestricted agricultural use. Under CO2 at 500 °C, hydrogen yield reached 10.42 mmol/g, while NH3 and SO2 emissions fell by 61.3% and 54.8%, respectively, relative to the pure-SS baseline. Multi-response desirability optimization identified 15% RM, N2, 500 °C as the overall optimum among the conditions tested (D = 0.847). To the authors’ knowledge, few studies have examined ternary co-pyrolysis systems combining agricultural, municipal, and industrial waste streams under both inert and CO2-assisted atmospheres; these findings show that red mud addition can simultaneously improve biochar porosity, reduce ecotoxicological risk, and enhance hydrogen co-production from a ternary waste-derived feedstock.



