Emerging pollutants, such as sulfonamide antibiotics and pharmaceuticals, have been widely detected in water and soils, posing serious environmental and human health concerns. Thus, it is urgent and necessary to develop a technology for removing them. In this work, a hydrothermal carbonization method was used to prepare the hydrochars (HCs) by pine sawdust with different temperatures. To improve the physicochemical properties of HCs, phosphoric acid (H 3 PO 4 ) and hydrogen peroxide (H 2 O 2 ) were used to modify these HCs, and they were referred to as PHCs and HHCs, respectively. The adsorption of sulfamethoxazole (SMX) and carbamazepine (CBZ) by pristine and modified HCs was investigated systematically. Scanning electron microscopy (SEM) and X-ray diffraction (XRD) results indicated that the H 2 O 2 /H 3 PO 4 modification led to the formation of a disordered carbon structure and abundant pores. X-ray photoelectron spectroscopy (XPS) and Fourier transform infrared (FTIR) spectroscopy results suggested that carboxyl (-COOH) and hydroxyl (-OH) functional groups of HCs increased after modification, which is the main reason for the higher sorption of SMX and CBZ on H 3 PO 4 /H 2 O 2 -modified HCs when compared with pristine HCs. In addition, the positive correlation between −COOH/C=O and logK d of these two chemicals also suggested that oxygen-containing functional groups played a crucial role in the sorption of SMX and CBZ. The strong hydrophobic interaction and π−π interaction between CBZ and pristine/modified HCs resulted in its higher adsorption when compared with SMX. The results of this study provide a novel perspective on the investigation of adsorption mechanisms and environmental behaviors for organic contaminants by pristine and modified HCs.