In recent years, excessive amounts of drugs such as antibiotics have been used to combat COVID-19 and newly discovered viruses. This has led to the production and release of signifcant amounts of drugs and their metabolites as toxic pollutants in aquatic systems. Therefore, pharmaceutical wastes must be removed efciently before entering the environment and entering water sources. In this research, Ni/Al-LDH@ZIF-8 nanocomposite was synthesized from layered double hydroxides and metal-organic frameworks and used to remove the antibiotic sarafoxacin (SRF) in the aqueous medium. The work aimed to develop the performance and combine the features of the adsorbent compounds such as high surface area, adjustable porosity, and low-density structure. Diferent methods implemented to analyze the nanocomposite, such as Fourier transform infrared spectroscopy, X-ray difraction, feld emission scanning electron microscopy, and energy dispersive X-ray spectroscopy. The experiment utilized the central composite design to evaluate statistics and the response level method to optimize the factors afecting the absorption process. The initial concentration of SRF, adsorbent dose, pH, and contact time were considered in this experiment. The results showed an increase in the removal efciency of SRF to 97%. Statistical studies showed that the optimal adsorption conditions are as follows: initial concentration of SRF 40 mg·L–1, pH 6.3, adsorbent dose of Ni/AlLDH@ZIF-8 49 mg, and contact time of 44 min. According to the model of isotherms parameters, the adsorption process is more consistence with the Freundlich model with the absorption capacity of 79.7 mg·g−1. The pseudo-second-order model described the adsorption kinetics data.