Dung beetles perform important ecosystem functions including livestock dung removal, nutrient recycling and parasite control. However, more research is being done on the effects of veterinary drug residues on dung beetles due to the widespread usage of macrocyclic lactone (ML). While a number of research on this topic have been published in Europe, Africa and America, few have been in Asia. In the past decade, standard veterinary antibiotics administration in livestock grazing systems in the rangelands of northern China has included ML. In the present study, the abundance, species richness, diversity, and evenness of dung beetles in the rangelands of northern China in 2020 were examined and compared to the reference data from 2010, when parasiticide had never been used, to better understand the changes in dung beetle communities after the long-term use of parasiticides. The abundance and diversity of dung beetle populations in the current three rangelands in northern China were first investigated using a baited-trap experiment. The findings revealed a 67.3 % decrease in dung beetle abundance and a shift in the dominant species from Aphodiidae to Staphylinidae. Cattle dung on the three studied rangelands included high ML residues ranging from 22.7 ppb to 130.1 ppb. According to the results of the correlation analysis, the beetle abundance and ML residues in cattle dung were negatively correlated. In the meantime, the findings of a field examination of undecomposed cattle dung on 34 rangelands in northern China revealed that the coverage rate of dried cattle dung pats ranged from 2 % to 6 % on 24 rangelands and reached above 10 % on four rangelands. According to the current findings, the decrease in cattle dung beetles would slow down the decomposition of cattle dung pats and decrease the available grazing area. Therefore, the dung beetle community in the rangelands of northern China would be negatively impacted by the frequent administration of ML to cattle. This would result in significant changes to the biogeochemical cycle of rangeland and had a negative impact on the development of local husbandry. During rangeland management, more attention should be given to the dynamic changes of coprovorous insects and the application of veterinary antibiotics.