Knowledge about gene expression in animals involved in abnormal behaviors can contribute to the understanding of underlying biological mechanisms. This study aimed to explore the motivational background to tail biting, an abnormal injurious behavior and severe welfare problem in pig production. Affymetrix microarrays were used to investigate gene expression differences in the hypothalamus and prefrontal cortex of pigs performing tail biting, pigs receiving bites to the tail and neutral pigs who were not involved in the behavior. In the hypothalamus, 32 transcripts were differentially expressed (P < 0.05) when tail biters were compared with neutral pigs, 130 when comparing receiver pigs with neutrals, and two when tail biters were compared with receivers. In the prefrontal cortex, seven transcripts were differently expressed in tail biters when compared with neutrals, seven in receivers vs. neutrals and none in the tail biters vs. receivers. In total, 19 genes showed a different expression pattern in neutral pigs when compared with both performers and receivers. This implies that the functions of these may provide knowledge about why the neutral pigs are not involved in tail biting behavior as performers or receivers. Among these 19 transcripts were genes associated with production traits in pigs (PDK4), sociality in humans and mice (GTF2I) and novelty seeking in humans (EGF). These are in line with hypotheses linking tail biting with reduced back fat thickness and explorative behavior.