The recontamination of farming wastewater with antibiotics and metal ions has emerged as a considerable concern in recent years. In this study, fly ash (FA) served as the adsorbent material, and its modified form (AFA) was developed via response surface optimization. The study involved an analysis of the structure and chemical composition of the fly ash before and after modification, both pre- and post-modification, through the use of scanning electron microscopy (SEM), X-ray diffraction (XRD), and Fourier transform infrared spectroscopy (FT-IR) analyses. These analyses were aimed at exploring the adsorption mechanism of ciprofloxacin (CIP) in the presence of copper ion (Cu2+) in livestock and poultry wastewater. The study indicates that the optimal modification parameters for AFA include an alkali-to-ash ratio of 1.5, a calcination temperature of 400 °C, and a 3-hour calcination period. At pH 6, AFA exhibited a markedly superior adsorption capacity for CIP in comparison to FA, with AFA achieving 19.32 mg/g and FA only 9.61 mg/g. The adsorption process conforms to the quasi-second-order kinetic model and Langmuir isothermal model.The adsorption capacity for CIP increases at low concentrations, specifically when Cu2+ levels are below 100 mg/L. Nevertheless, elevated CIP concentrations impede the adsorption process. The adsorption of AFA for CIP is observed to decrease with rising temperature, in contrast to the adsorption of Cu2+, which increases as the temperature rises. The adsorption mechanism of AFA is primarily comprised of pore filling, ion exchange, electrostatic interaction, π bond coordination, complexation, and other similar processes.