Xenobiotic metabolism in insects is thought to have many similarities to that of mammals but is comparatively poorly understood, despite its crucial relevance to plant-insect ecological interactions, agricultural insecticide use, and the suitability of insects as pharmacological models. Phosphorylation of xenobiotic compounds, a rare detoxification reaction in mammals, is widespread in insects, but the enzymes responsible are unknown. The EcKinases, a family of small-molecule kinases present in insects and crustaceans but not vertebrates, have been previously implicated in steroid hormone metabolism, but we here present comparative phylogenomic evidence suggesting some members are responsible for xenobiotic phosphorylation reactions and are therefore non-canonical detoxification enzymes. We have manually annotated the EcKinase family in 129 insect genomes and reconstructed their evolution within and between 11 insect orders. EcKinase family size varies dramatically across insect genomes, from 12 genes in most bees to 104 genes in the German cockroach, and positively correlates with the size of canonical detoxification gene families. Many clades of EcKinases in the saprophagous fly genus Drosophila have experienced rapid gene gain and loss, and their members tend to have enriched expression in digestive and metabolic tissues and are transcriptionally induced by xenobiotic compounds, strongly suggesting roles in detoxification. In contrast, bees and tsetse flies, two taxa with reduced need for xenobiotic detoxification, have comparatively fewer EcKinases, nearly all of which are very stable. In Lepidoptera, generalist herbivores have significantly more EcKinases than specialists, which can be explained by repeated, independent expansions of two ancestral clades in generalist lineages. Our data suggest EcKinases can contribute to xenobiotic metabolism in herbivorous and saprophagous insects, and we are carrying out genetic and toxicological experiments in Drosophila melanogaster to test their function in the detoxification of plant and fungal secondary metabolites.