With the expansion of industrialization and intensive livestock farming, sulfamethoxazole (SMX) is frequently detected in aquatic environments, posing potential risks to ecological and public health. In this study, four biomass-derived porous biochars (PAC, CAC, CSAC, and RHAC) were prepared via one-step co-pyrolysis using K2CO3 as activator and agricultural and forestry waste, including poplar sawdust, coconut shell, corn straw, and rice husks, as precursors. The effects of feedstock composition on pyrolysis behavior, pore structure, surface chemistry, and SMX adsorption performance were systematically investigated through multidimensional characterization and adsorption analyses. The results showed that the composition of the biomass feedstock significantly influenced pore development and surface properties during activation. Poplar sawdust and coconut shell, characterized by low ash content and high volatile matter content, produced porous biochars with higher specific surface areas (1510.7 and 1380.5 m2 g-1, respectively) and smaller average pore diameters (2.31-2.37 nm). By contrast, the higher ash content of corn straw and rice husks limited pore development and resulted in porous biochar with larger average pore diameters (similar to 4 nm) and a higher mesoporous ratio. Adsorption isotherm and kinetic analysis showed that the adsorption behavior is closely related to pore structure and surface chemistry and is governed by multiple interactions, including pore filling and surface adsorption effects. This study provides insights into the relationship between biomass feedstock characteristics, porous biochar structure, and adsorption performance, and offers a basis for the targeted preparation of porous biochar adsorbents for antibiotic removal from water.