The harmful effects of the widespread presence of sulfamethoxazole (SMX) in water on ecosystems have become an increasingly pressing concern, necessitating the urgent development of an effective decontamination strategy. In this work, iron and nitrogen co-doped biochar (Fe-N-BC) samples were synthesized using peanut shells as a precursor to activate peroxydisulfate for SMX degradation. The most effective Fe-N-BC had a 12 times higher SMX removal rate of 97.00% within 90 min compared to the pristine biochar. The excellent catalytic performance was achieved by the synergistic effect of the Fe and N active sites, and the system contained not only typical free radicals (SO4− and OH) but also high-valent iron species (Fe(IV)). Further quantitative experiments with active species revealed that the free radical reaction pathway played a predominant role, while the relative contribution of Fe(IV) was only 8.01%. Furthermore, the degradation pathways of SMX in the system were proposed, and toxicity assessment revealed that all intermediate products exhibited lower toxicity levels than SMX. This study clarifies the structure–activity relationships of Fe-N-BC for PDS activation and offers an innovative strategy for the treatment and utilization of agricultural waste biomass as the catalyst.