Mesoporous carbon materials (MCs) are known for their high specific surface area and porous structure, rendering them promising candidates for efficient antibiotic adsorption. However, the influence of antibiotic properties and the porous structure of MCs on adsorption remains unclear. This study investigated the adsorption behaviors of ten macrolides (MLs) onto four MCs with porous structures, aiming to understanding the key factors governing their adsorption. The results revealed that the adsorption rate constant (k2) and adsorption constant of Freundlich isotherm (KF) were influenced by the McGowan molar volume of MLs. Molecular dynamics simulations uncovered that a distance of approximately 4 Å between adsorbed MLs from the material surface, suggesting hydrophobic interactions play a crucial role. Moreover, ML diffusion was more favorable on the surface of 10 nm pore compared to 2 nm pores, highlighting the impact of pore size on diffusion. Additionally, the diffusion coefficient of MLs was mainly determined by logKow, emphasizing the significance of hydrophobic interactions in diffusion. Multilinear regression modelling further supports hydrophobic interactions as the main adsorption mechanism for MLs. Overall, this study provides valuable insights into the complex adsorption mechanisms of MLs on MCs, informing the development of more effective antibiotic removal strategies.