Avermectins and milbemycins are antiparasitic agents widely used as active pharmaceutical ingredients in veterinary medicine, as well as in pesticides formulations for pests control in agriculture. Although the use of these compounds brings benefits to the agribusiness, they can impact the environment, since a large part of these substances reaches the soil and water, through the excreta of the treated animals and direct application in the crops.The present work had the objective of evaluating the behavior of eprinomectin, doramectin and moxidectin in three types of soils of the State of São Paulo, through sorption, desorption and aerobic dissipation studies, according to the recommendations of the OECD Guidelines 106 and 307. The sorption kinetic parameters of the veterinary drug in the soils, between 0 and 48 hours, were evaluated and the sorption and desorption thermodynamic parameters were obtained by the construction of the isotherms adjusted to the Freundlich model.The studies indicated high affinity of the veterinary drugs to the soil, with Freundlich sorption and desorption coefficients of 14 to 424 μg g -1 mL 1/n μg -1/n and 31 to 565 μg g -1 mL 1/n μg -1/n , respectively, indicating low mobility of the drugs in the evaluated soils and low tendency to leaching (index of GUS -1.10 to 0.08). Dissipation of the veterinary drugs in soils was evaluated in a stability chamber at 22 °C, 71% relative humidity and protected from light. DT50 values ranged from 9 to 16 days. Finally, an analytical method was developed and validated using an on-line solid-phase extraction technique coupled with ultrahigh performance liquid chromatography and tandem mass spectrometry (online SPE-UHPLC-MS/MS) for the determination of eprinomectin, abamectin, doramectin, ivermectin and moxidectin in soils. For the veterinary drugs, the method presented a linear range of 0.5 to 10 ng g -1 , with linearity greater than 0.99 and limit of quantification lower than 0.2 ng g -1 . The method was applied in a study of dissipation of abamectin in a crop, after application in an orange plantation.