The longhorned beetles, Rhaphuma horsfieldi and Xylotrechus quadripes, are two polyphagous insects with larvae feeding on different host plants. In this study, we identified and characterized three gene superfamilies of cytochrome P450s (CYPs), carboxylesterases (COEs) and glutathione-S-transferases (GSTs) involved in the detoxification of endobiotics (e.g., hormones and steroids) and xenobiotics (e.g., insecticides, sex pheromones and plant allelochemicals) through a combination approach of bioinformatics, phylogenetics, expression profiles and genomics. Transcriptome analyses led to the identification of 281 transcripts encoding 135 P450s, 108 COEs and 38 GSTs from the two beetles, coupled with comparative studies of detoxification genes among coleopteran species, suggesting a correlation between host range and the sizes of P450 or COE gene repertoires. The P450s of two beetles were phylogenetically classified into four clades, representing the majority of genes in the CYP3 clan. The COEs from R. horsfieldi and X. quadripes were separately grouped into 11 and 10 clades, and the GST superfamily was assigned into six clades. Expression profiles revealed that the detoxification genes were broadly expressed in various tissues as an implication of functional diversities. Ultimately and more importantly, five alternative splicing events in the Epsilon GSTs, including RhorGSTe7.1/GSTe7.2 and XquaGSTe3.1/GST3.2, were acquired in Coleoptera, in which these genes and their orthologs shared highly conserved gene structure. Our current study has complemented the resources for the detoxification genes in the family Cerambycidae, and allows for functional experiments to identify candidate molecular targets involved in pest resistance to insecticides like organophosphates, organochlorines and pyrethroids.