The evolutionary changes from solitary to eusocial living in vertebrates and invertebrates are associated with the diversification of social interactions and the development of queen and worker castes. Despite strong innate patterns, our understanding of the mechanisms manifesting these sophisticated behaviors is still rudimentary. Here, we show that doublesex (dsx) manifests group-supporting behaviors in the honeybee (Apis mellifera) worker caste. Computer-based individual behavioral tracking of worker bees with biallelic stop mutations in colonies revealed that the dsx gene is required for the rate and duration of group-supporting behavior that scales the relationship between bees and their work. General sensorimotor functions remained unaffected. Unexpectedly, unlike in other insects, the dsx gene is required for the neuronal wiring of the mushroom body in which the gene is spatially restricted expressed. Together, our study establishes dedicated programming for group-supporting behaviors and provides insight into the connection between development in the neuronal circuitry and behaviors regulating the formation of a eusocial society.