Heavy metal contamination is among the most prominent environmental problems in China, posing serious threats to both ecosystem and human health. Among the diverse heavy metal contaminants, cadmium is the most serious. The whitefly Bemisia tabaci is a cosmopolitan pest capable of causing severe damage to a broad range of agricultural crops, especially vegetables. At present, little is known about the effects of cadmium stress on B. tabaci, including on its bacterial and fungal communities. In the current study, we investigated the effects of cadmium on bacterial and fungal communities in whiteflies. Meta-barcode sequencing of the 16S rRNA gene revealed that the whitefly bacterial community contained 264 operational taxonomic units (OTUs) belonging to 201 known genera and 245 known species. The top five most frequent bacterial genera were Rickettsia, Rhodococcus, Candidatus Portiera, Candidatus Hamiltonella, and Achromobacter. Meta-barcode sequencing of the fungal ITS locus revealed that the whitefly fungal community contained 357 OTUs belonging to 187 known genera and 248 known species. The top five most frequent fungal genera were Wallemia, unclassified_f_Dipodascaceae, Apiotrichum, Penicillium, and unclassified_o_Saccharomycetales. Cadmium exposure reduced the fungal OTU richness but increased the bacterial Shannon and Simpson diversity indices in whiteflies. In addition, upon exposure to cadmium, the microbial community composition in whiteflies changed significantly, with increased prevalence of the bacterial genera Rhodococcus and Exiguobacterium and fungal genus Wallemia. Our results indicate that the whitefly microbiota likely contributed to their adaptation and resistance to cadmium and suggested that whiteflies may contain microbes that could help remediate cadmium contamination in natural environments and agricultural fields.