Recent work has demonstrated that many bee species have specific cytochrome P450 enzymes (P450s) that can efficiently detoxify certain insecticides. The presence of these P450s, belonging or closely related to the CYP9Q subfamily (CYP9Q-related), is generally well conserved across the diversity of bees. However, the alfalfa leafcutter bee, Megachile rotundata, lacks CYP9Q-related P450s and is 170-2500 times more sensitive to certain insecticides than bee pollinators with these P450s. The extent to which these findings apply to other Megachilidae bee species remains uncertain. To address this knowledge gap, we sequenced the transcriptomes of four Megachile species and leveraged the data obtained, in combination with publicly available genomic data, to investigate the evolution and function of P450s in the Megachilidae. Our analyses reveal that several Megachilidae species, belonging to the Lithurgini, Megachilini and Anthidini tribes, including all species of the Megachile genus investigated, lack CYP9Q-related genes. In place of these genes Megachile species have evolved phylogenetically distinct CYP9 genes, the CYP9DM lineage. Functional expression of these P450s from M. rotundata reveal they lack the capacity to metabolize the neonicotinoid insecticides thiacloprid and imidacloprid. In contrast, species from the Osmiini and Dioxyini tribes of Megachilidae have CYP9Q-related P450s belonging to the CYP9BU subfamily that are able to detoxify thiacloprid. These findings provide new insight into the evolution of P450s that act as key determinants of insecticide sensitivity in bees and have important applied implications for pesticide risk assessment.