Complex brains and behaviors have occurred repeatedly within vertebrate classes throughout evolution. What adaptive pressures drive such changes? Both environmental and social features have been implicated in the expansion of select brain structures, particularly the telencephalon. East African cichlid fishes provide a superb opportunity to analyze the social and ecological correlates of neural phenotypes and their evolution. As a result of rapid, recent, and repeated radiations, there are hundreds of closely-related species available for study, with an astonishing diversity in habitat preferences and social behaviors. In this study, we present quantitative ecological, social, and neuroanatomical data for closely-related species from the (monophyletic) Ectodini clade of Lake Tanganyikan cichlid fish. The species differed either in habitat preference or social organization. After accounting for phylogeny with independent contrasts, we find that environmental and social factors differentially affect the brain, with environmental factors showing a broader effect on a range of brain structures compared to social factors. Five out of seven of the brain measures show a relationship with habitat measures. Brain size and cerebellar size are positively correlated with species number (which is correlated with habitat complexity); the medulla and olfactory bulb are negatively correlated with habitat measures. The telencephalon shows a trend toward a positive correlation with rock size. In contrast, only two brain structures, the telencephalon and hypothalamus, are correlated with social factors. Telencephalic size is larger in monogamous species compared to polygamous species, as well as with increased numbers of individuals; monogamy is also associated with smaller hypothalamic size. Our results suggest that selection or drift can act independently on different brain regions as the species diverge into different habitats and social systems.