Honeybees form complex societies with a division of labor for reproduction, nutrition, nest construction and maintenance, and defense. How does it evolve? Tasks performed by worker honeybees are distributed in time and space. There is no central control over behavior and there is no central genome on which selection can act and effect adaptive change. For 22 years, we have been addressing these questions by selecting on a single social trait associated with nutrition: the amount of surplus pollen (a source of protein) that is stored in the combs of the nest. Forty-two generations of selection have revealed changes at biological levels extending from the society down to the level of the gene. We show how we constructed this vertical understanding of social evolution using behavioral and anatomical analyses, physiology, genetic mapping, and gene knockdowns. We map out the phenotypic and genetic architectures of food storage and foraging behavior and show how they are linked through broad epistasis and pleiotropy affecting a reproductive regulatory network that influences foraging behavior. This is remarkable because worker honeybees have reduced reproductive organs and are normally sterile; however, the reproductive regulatory network has been co-opted for behavioral division of labor.