Fish brains and sensory organs may vary greatly between species. With an estimated total of 25 000 species, fish represent the largest radiation of vertebrates. From the agnathans to the teleosts, they span an enormous taxonomic range and occupy virtually all aquatic habitats. This diversity offers ample opportunity to relate ecology with brains and sensory systems. In a broadly comparative approach emphasizing teleosts, we surveyed ‘classical’ and more recent contributions on fish brains in search of evolutionary and ecological conditions of central nervous system diversification. By qualitatively and quantitatively comparing closely related species from different habitats, particularly cyprinids and African cichlids, we scanned for patterns of divergence. We examined convergence by comparing distantly related species from similar habitats, intertidal and deep-sea. In particular, we asked how habitats relate to the relative importance of different sensory faculties. Most fishes are predominantly visually orientated. In addition, lateral line and hearing are highly developed in epi- and mesopelagic species as well as in the Antarctic notothenoids. In bathypelagics, brain size and the lobes for vision and taste are greatly reduced. Towards shallow water and deep-sea benthic habitats, chemosenses increase in importance and vision may be reduced, particularly in turbid environments. Shallow tropical marine and freshwater reefs (African lakes) enhance visual predominance and appear to exert a considerable selection pressure towards increased size of the (non-olfactory)telencephalon. The development of cognitive skills (spatial learning, problem solving) in fish seems to be associated with visual orientation and well-structured habitats.