The granule-based anammox process has been reported to be more resistant to the stress of antibiotics; however, the underlying resistance mechanism is still not fully understood. In this study, we found that more microbubbles stably adhered to the surface layer of anammox granular sludge (AnGS, Gs) operating under long-term sulfamethoxazole (SMZ) stress of 2 mg/L, compared to that in the control reactor (Gc). The difference in covering content can be up to over three times (1.0 ± 0.1% vs 0.3 ± 0.0%). Batch tests showed that the coverage ratio of microbubbles on Gs reached approximately 32.5%, which significantly reduced SMZ transfer into AnGS due to the adsorption of SMZ by bubbles, thus alleviating the inhibition of anammox bacterial activity by 36.5%. The adhesion force between the microbubbles and the surface layer of Gs was found to be largely enhanced by 75.0% compared to that of Gc. The increased hydrophobicity of surface layer due to the increased extracellular polymer substance (EPS, mainly proteins) content, and the larger capillary force of surface layer, owing to the unique micronano structure, were identified as key factors responsible for the stable adhesion of microbubbles on the Gs. Consequently, this study demonstrated the vital roles of the surface-adhered microbubbles in resisting the stress of SMZ and shed light on the regulation and development of robust granule-based anammox processes.