The mating system is thought to be important in shaping animal intelligence and sexual selection has been depicted as a driver of cognitive evolution, either directly by promoting superior cognitive ability during mate competition, or indirectly via genic capture of sexually selected traits. However, it remains unclear if intensified sexual selection leads to general improvements in cognitive abilities. Here, we evaluated this hypothesis by applying experimental evolution in seed beetles. Replicate lines, maintained for 35 generations of either enforced monogamy (eliminating sexual selection) or polygamy, were challenged to locate and discriminate among mates (male assays) or host seeds (female assays) in a spatial chemosensory learning task. All lines displayed learning between trials. Moreover, polygamous males outperformed monogamous males, providing evidence that sexual selection can lead to the evolution of improved male cognition. However, there were no differences between regimes in rates of male learning, and polygamous females showed no improvement in host search and even signs of reduced learning. Hence, sexual selection increased performance in cognitively demanding mate search, but it did not lead to general increases in cognitive abilities. We discuss the possibility that sexually antagonistic selection is an important factor maintaining abundant genetic variation in cognitive traits.