Background: Feather pecking (FP) in laying hens reduces animal welfare and leads to economic losses for the layer industry. FP is considered a heritable condition that is influenced by dysregulation of neurotransmitter homeostasis, the gut microbiome, and the immune system. To identify genes and biological pathways responsible for FP behavior we compared the brain transcriptomes of 48 hens divergently selected for FP. In addition, we tested if high feather peckers (HFP) and low feather peckers (LFP) respond differently to light since light has been shown to trigger FP behavior. Results: Of approximately 48 million reads/sample an average of 98.4% were mapped to the chicken genome (GRCg6a). We found 13,070 expressed genes in the analyzed brains of which 423 showed differential expression between HFP and LFP. Genes of uncertain function and non-coding RNAs were overrepresented among those transcripts. Functional analyses revealed the involvement of cholinergic signaling, postsynaptic activity, membrane channels, and the immune system. After the light stimulus, 28 genes were found to be differentially expressed. These included an interaction cluster of core components of the circadian clock. However, differences in the response to light between HFP and LFP were not detectable. Conclusions: Genes involved in cholinergic signaling, channel activity, synaptic transmission, and immune response were found to be involved in FP behavior. We propose a model in which the gut microbiota modulates the immune system, which in turn affects cholinergic signaling. This might have an influence on monoamine signaling with possible involvement of GABA or glutamate signaling.