Efficient and eco-friendly technologies for removing antibiotic pollutants like chloramphenicol (CAP) from wastewater are becoming increasingly important. Among these, microalgal-bacterial granular sludge (MBGS) represents a promising green biotechnology capable of tackling such contaminants. However, the interactions between CAP and MBGS, as well as how CAP influences the community structure and function of MBGS, have not yet been fully understood. This study investigated the effectiveness of the MBGS system in CAP removal and examined microbial responses to CAP exposure. Our findings indicate that MBGS exhibits remarkable adaptability to CAP, altering its microbial characteristics to mitigate CAP toxicity while maintaining the efficacy of pollutant removal. Notably, there was a significant increase in key microorganisms such as Hydrogenophaga, Polaromonas, and Acidovorax. Additionally, the prevalence of resistance genes cmlA8, floR, catB and cfr under CAP exposure suggests adaptive mechanisms likely involving efflux pumps, CAP acetyltransferase B and ribosomal RNA methyltransferase. CAP degradation appears to proceed via the amide bond hydrolase EstDL136, thereby reducing its toxicity and producing less harmful byproducts such as 2,2-dichloroacetic acid. This study provides new insights into how CAP affects MBGS communities and identifies the mechanisms for CAP degradation, offering valuable insights that MBGS could serve as an effective and environmentally sustainable technology for the treatment of wastewater containing antibiotic pollutants.