This study investigated the effects of environmental enrichment on the cognitive performance of female conventional farm (growing) pigs in a spatial holeboard task. Ten pairs of littermates matched for weight were used. From each litter, one piglet was randomly assigned to a barren environment; the other was assigned to an enriched environment from 4 weeks of age. The enriched environment was double the size of the barren environment, had a floor covered with straw, a rooting area filled with peat, and one of the four different enrichment toys which were exchanged daily. Starting at 11 weeks of age, all pigs were tested in a spatial holeboard discrimination task in which 4 out of 16 holes were baited. Furthermore, basal salivary cortisol levels of all pigs were determined after the end of all testing. All pigs were able to acquire the pattern of baited holes (acquisition phase, 40 trials) and the diagonally mirrored pattern (reversal phase, 20 trials). During the acquisition phase, the reference memory performance of the enriched-housed pigs was better than that of their barren-housed littermates, i.e. they reduced visits to the unbaited set of holes. During the reversal phase, enriched-housed pigs had a better general working memory performance than the barren-housed pigs as indicated by reduced revisits to holes already visited during a trial, irrespective of whether they were of the baited or the unbaited set. The enriched-housed pigs also searched for the hidden bait faster during both phases. The environments did not affect basal salivary cortisol levels. In conclusion, environmental enrichment slightly improved the cognitive performance of pigs in a spatial learning task. We hypothesise that the long period of habituation to and testing in the holeboard acted as enrichment that partially reduced the effects of barren housing.