Biochar is an eco-friendly, renewable, and cost-effective material that can be used as an adsorbent for the remediation of contaminated environments. In this paper, two types of biochar were prepared through corn straw and poplar leaf pyrolysis at 300 °C and 700 °C (C300, C700, P300, P700). Brunaer–Emmett–Teller N2 surface area, scanning electron microscope, elemental analysis, and infrared spectra were used to characterize their structures. These biochars were then used as adsorbents for the adsorption of dodecylbenzene sulfonic acid (DBSA). The microscopic adsorption mechanisms were studied by using infrared spectra, 13C-nuclear magnetic resonance spectra, and electron spin resonance spectra. The surface area and pore volume of C700 (375.89 m2/g and 0.2302 cm3/g) were the highest among all samples. Elemental analysis results showed that corn straw biochars had a higher aromaticity and carbon to nitrogen (C/N) ratio than the poplar leaf biochars. High temperature caused the increase of carbon content and the decrease of oxygen content, which also gave the biochars a higher adsorption rate. Pseudo-second order kinetic provided a better fit with the experimental data. Adsorption isotherm experiments showed that the adsorption isotherm of C300 fit the linear model. For other biochars, the adsorption isotherms fitted Langmuir model. Biochars with high temperatures exhibited enhanced adsorption capacity compared with ones at low temperatures. The qmax values of biochars to DBSA followed the order of P700 > C700 > P300. The adsorption mechanisms were complex, including partition, anion exchange, the formation of H bonds, covalent bonds, and charge transfer. The adsorption by covalent bonding might be the key mechanism determining the adsorption capacity of P700.