Some symbiotic microbes are restricted to specialized host cells called bacteriocytes. However, the molecular and cellular mechanisms underlying the development of bacteriocytes are largely obscure. We find that maternally inherited bacteriocytes proliferate in adult females but degenerate in adult males of the whitefly Bemisia tabaci. Single-cell transcriptomics and immunohistochemistry reveal that cell division only occurs in the bacteriocytes of adult females, whereas autophagy and apoptosis are induced in the bacteriocytes of adult males. A transcription factor, Adf-1, enriched in bacteriocytes, is highly expressed in female bacteriocytes relative to male bacteriocytes. Silencing Adf-1 reduces the bacteriocyte number and Portiera titer and activates autophagy and apoptosis in females. The differential dynamics of both cell division and death in bacteriocytes and distinct expression of Adf-1 in bacteriocytes between whitefly sexes underlie the sexual differentiation of bacteriocyte development. Our study reveals that insect sex affects the development of bacteriocytes by cellular and molecular remodeling.