This research investigated the synthesis of biochar through the direct pyrolysis of pre-roasted sunflower seed shells (SFS) and peanut shells (PNS) and compared their application for the effective removal of textile dyes from wastewater. Biochar prepared at 900 °C (SFS900 and PNS900) showed the highest adsorption capacity, which can be attributed to the presence of higher nitrogen content and graphite-like structures. CHNS analysis revealed that PNS900 exhibited an 11.4% higher carbon content than SFS900, which enhanced the environmental stability of PNS biochar. Fourier-transform infrared spectroscopy (FTIR) and X-ray diffraction (XRD) analyses of the produced biochar indicated the degradation of cellulosic and lignin moieties. X-ray photoelectron spectroscopy (XPS) revealed a 13.8% and 22.6% increase in C-C/C=C mass concentrations in the SFS900 and PNS900, respectively, and could be attributed to the condensation of polyaromatic structures. Batch experiments for dye removal demonstrated that irrespective of dye species, PNS900 exhibited superior dye removal efficiency compared to SFS900 at similar dosages. In addition to H-bonding and electrostatic interactions, the presence of pyridinic-N and graphitic-N can play a vital role in enhancing Lewis acid-base and π-π EDA interactions. The results can provide valuable insights into the biochar–dye interaction mechanisms.