Oxytetracycline (OTC) in the environment can cause the increase of resistance of pathogenic microorganisms and the spread of antibiotic resistance genes, which poses a serious threat to human health and ecological environment, so the removal of OTC has attracted much attention. In this study, Magnetic ion-exchange resin (MIEX) was used as the adsorbent to remove OTC. The adsorption mechanisms of OTC by MIEX was analyzed through adsorption experiment, characterization analysis and theoretical calculation. The results showed that the adsorption of OTC by MIEX was more consistent with pseudo-first-order kinetic model and Freundlich isotherm model, was mainly chemical adsorption and endothermic. The presence of anions of PO43-, SO42-, Cl-, NO 3- and organic matter (HA) competed for the adsorption site of MIEX, reduced the removal efficiency of OTC by 22.7 %, 20.0 %, 10.9 %, 7.8 % and 5.8 %, respectively. pH affected the presence of OTC, under alkaline condition, OTC was mainly anion, which was conducive to the anion exchange process. The existence of H bond was confirmed by the theoretical calculation and characterization analysis. MIEX was more reactive with OTC in alkaline conditions, and the binding energy of MIEX-OTC- was-114.60 kcal/mol. In real secondary effluent, various anions and negatively charged pollutants would reduce the removal of OTC, and correlation analysis showed that there was a significant correlation between the removal of OTC and cluster I pollutants (C1-C4 and UV254), which could reflect the removal of OTC. This research provides a feasible technical strategy for the removal of hydrophobic refractory substances in wastewater advanced treatment.