Insectivorous bats are generalist predators and can flexibly respond to fluctuations in the distribution and abundance of insect prey. To better understand the effects of bats on arthropod pests, the types of pests eaten by bats and the response of bats to insect prey need to be determined. In this study, we performed DNA metabarcoding to examine prey composition and pest diversity in the diets of four insectivorous species of bats (Hipposideros armiger, Taphozous melanopogon, Aselliscus stoliczkanus, and Miniopterus fuliginosus). We evaluated the correlation between bat activity and insect resources and assessed dietary niche similarity and niche breadth among species and factors that influence prey consumption in bats. We found that the diets of these bats included arthropods from 23 orders and 200 families, dominated by Lepidoptera, Coleoptera, and Diptera. The proportion of agricultural pests in the diet of each of the four species of bats exceeded 40% and comprised 713 agricultural pests, including those that caused severe economic losses. Bats responded to the availability of insects. For example, a higher abundance of insects, especially Lepidoptera, and a higher insect diversity led to an increase in the duration of bat activity. In areas with more abundant insects, the number of bat passes also increased. The dietary composition, diversity, and niches differed among species and were particularly significant between H. armiger and T. melanopogon; the dietary niche width was the greatest in A. stoliczkanus and the narrowest in H. armiger. The diet of bats was correlated with their morphological and echolocation traits. Larger bats preyed more on insects in the order Coleoptera, whereas the proportion of bats consuming insects in the order Lepidoptera increased as the body size decreased. Bats that emitted echolocation calls with a high peak frequency and duration preyed more on insects in the order Mantodea. Our results suggest that dietary niche differentiation promotes the coexistence of different bat species and increases the ability of bats to consume insect prey and agricultural pests. Our findings provide greater insights into the role of bats that prey on agricultural pests and highlight the importance of combining bat conservation with integrated pest management.