Key pointsr The function of serotonergic fibres onto sensory areas remains poorly understood r We show that serotonin application enhances sensory neural and behavioural responses to second order stimuli r Enhanced neural responses most likely occurred because of increased burst firing r Changes in neural sensitivity due to burst firing were the best predictor of changes in behavioural sensitivity r Our results suggest that serotonin optimizes coding of stimuli encountered during aggression.Abstract Understanding how the processing of sensory information leads to behavioural responses remains a central problem in systems neuroscience. Here, we investigated how the neuromodulator serotonin affects neural and behavioural responses to second-order envelope stimuli within the electrosensory system of the weakly electric fish Apteronotus leptorhynchus. We found that serotonin application increased neuronal excitability through greater tendency for burst firing. We found that increased excitability led to overall higher neural sensitivities to higher envelope frequencies. Separating the spike train into bursts and isolated spike train components revealed that this was due to significant increases in neural sensitivity for the former but not the latter. We next investigated the consequences of such changes in sensitivity towards optimized coding of stimuli with specific statistics. Our results show that serotonin application compromised optimal coding of stimuli with statistics seen under naturalistic conditions due to changes in burst, but not isolated spike firing. Finally, we found that serotonin application increased behavioural sensitivity to envelope stimuli. Interestingly, changes in neural sensitivity due to bursts were a far better predictor of changes in behavioural sensitivity, suggesting that burst firing is decoded by downstream brain areas. Overall, our results suggest that serotonin modulates neural responses to optimize coding and perception of stimuli during behavioural contexts associated with encountering dominant conspecifics. Mariana Marquez is a PhD student in the Physiology department at McGill University. She holds a BS in Physics from the National Autonomous University of Mexico (UNAM) in Mexico City, Mexico. During her undergraduate studies she investigated changes in the neural oscillatory patterns due to homeostatic stress. She currently works on understanding how serotonin modulates neural responses to stimuli in nature.