Ecological theory suggests that the coexistence of species is promoted by the partitioning of available resources, as in dietary niche partitioning where predators partitioning prey. Yet, the mechanisms underlying dietary niche partitioning are not always clear. We used fecal DNA barcoding to investigate diets of seven nocturnal insectivorous bird and bat species. Low diet overlap (2-22%) supported resource partitioning among all species. Differences in diet corresponded with species identity, prey detection method, and foraging behavior of predators. Insects with ultrasonic hearing capabilities were consumed significantly more often by birds than by bats, consistent with an evolved avoidance of echolocating strategies. In turn, bats consumed a greater proportion of non-eared insects such as spruce budworm. Overall, our results suggest that evolutionary interactions among bats and moths translate to dietary niche partitioning and coexistence among bats and nocturnal birds.