ABSTRACT Brain development and behavior are sensitive to a variety of environmental influences including social interactions and physicochemical stressors. Sensory input in situ is a mosaic of both enrichment and stress, yet little is known about how multiple environmental factors interact to affect brain anatomical structures, circuits and cognitive function. In this study, we addressed these issues by testing the individual and combined effects of sub-adult thermal stress, larval density and early-adult living spatial enrichment on brain anatomy and olfactory associative learning in adult Drosophila melanogaster . In response to heat stress, the mushroom bodies (MBs) were the most volumetrically impaired among all of the brain structures, an effect highly correlated with reduced odor learning performance. However, MBs were not sensitive to either larval culture density or early-adult living conditions. Extreme larval crowding reduced the volume of the antennal lobes, optic lobes and central complex. Neither larval crowding nor early-adult spatial enrichment affected olfactory learning. These results illustrate that various brain structures react differently to environmental inputs, and that MB development and learning are highly sensitive to certain stressors (pre-adult hyperthermia) and resistant to others (larval crowding).