A new drug delivery system using an asymmetric polyethersulfone (PES) membrane modified by SBA-15 and glutamine-modified SBA-15 (SBA-Q) was prepared in this study by the aim of azithromycin delivery enhancement in both in vitro and ex vivo experiments. The research focused on optimizing membrane performance by adjusting critical parameters including drug concentration, membrane thickness, modifier percentage, polymer percentage, and pore maker percentage. To characterize the fabricated membranes, various techniques were employed, including scanning electron microscopy, water contact angle, and tensile strength assessments. Following optimization, membrane composition of 17% PES, 2% polyvinylpyrrolidone, 1% SBA-15, and 0.5% SBA-Q emerged as the most effective. The optimized membranes demonstrated a substantial increase in drug release (906 mg/L) compared to the unmodified membrane (440 mg/L). The unique membrane structure, with a dense top layer facilitating sustained drug release and a porous sub-layer acting as a drug reservoir, contributed to this improvement. Biocompatibility assessments, antibacterial activity analysis, blood compatibility tests, and post-diffusion tissue integrity evaluations confirmed the promising biocompatibility of the optimized membranes. Moreover, long-term performance evaluations involving ten repeated usages underscored the reusability of the optimized membrane, highlighting its potential for sustained and reliable drug delivery applications.