Monolithic electrocatalysts are desired for the electro-Fenton oxidation system. We used a hydrogel consisting of TEMPO-oxidized cellulose nanofibers (TOCN) and cationic guar gum (CGG) to disperse and support Fe-rich sludge and finally obtained a Fe-doped biochar (denoted as C-Sludge@TOCN/CGG) after the freeze-drying and carbonization. This C-Sludge@TOCN/CGG exhibited a porous structure with evenly-distributed Fe due to the inherently three-dimensional porous structure of TOCN/CGG hydrogel and the abundant carbon content. Importantly, Fe and FeO existed in C-Sludge@TOCN/CGG due to the presence of TOCN and CGG during the pyrolysis. The electrochemical properties of C-Sludge@TOCN/CGG demonstrated its good electrocatalytic activity and stability with few side reactions. It had good performance in the electrocatalytic degradation of various azo dyes, attributed to the synergistic integration of TOCN/CGG-derived carbon matrix and carbonized Fe-rich sludge particles. Specifically, two transient radicals (i.e. ·OH and ·O2−) primarily improved the electrocatalytic degradation performance of C-Sludge@TOCN/CGG. This C-Sludge@TOCN/CGG also efficiently degraded a papermill-sourced wastewater containing direct red 23, direct yellow 11, direct black 19 and toner, in which the COD value decreased from 365.12 to 179.13 mg/L within 9 h. This work provides an example of utilizing renewable materials and solid waste to design electrocatalysts to address the wastewater issue.