Brain size varies greatly at all taxonomic levels. Feeding ecology, life history and sexual selection have been proposed as key components in generating the existing contemporary diversity in brain size across vertebrates. Analyses of brain size evolution have, however, been limited to lineages where males predominantly compete for mating and females choose mates. Here, we present the first original data set of brain sizes in pipefishes and seahorses (Syngnathidae). In this group, intense female mating competition occurs in many species (i.e. reversed sex-roles), and mating patterns include monogamy, polygynandry and polyandry. After controlling for the effect of shared ancestry and overall body size, relatively larger brains were positively correlated with relatively longer snout length, which is related to the propensity for feeding on motile and evasive prey items in Syngnathidae, and larger egg size. Furthermore, we found that females, on average, had 4.3% heavier brains than males and that polyandrous species tended to demonstrate female-favored brain size dimorphism. Our results suggest that adaptations for feeding on motile prey items, energetic constraints associated with production of large-brained juveniles and sexual selection in females are important factors in brain size evolution of pipefishes and seahorses.