Background: Music is sometimes used as an adjunct to pain management. However, there is limited understanding of by what means music modulates pain perception and how the brain responds to nociceptive inputs while listening to music, because clinical practice typically involves the coexistence of multiple therapeutic interventions. To address this challenge, laboratory studies with experimental and control conditions are needed. Methods: In the present investigation, we delivered nociceptive laser stimuli on 30 participants under three conditions – participants were sitting in silence, listening to their preferred music, or listening to white noise. Differences among conditions were quantified by self-reports of pain intensity and unpleasantness, and brain activity sampled by electro-encephalography (EEG). Results: Compared with the noise and silence conditions, participants in the music condition reported lower ratings on pain unpleasantness, as reflected by reduced brain oscillations immediately prior to the nociceptive laser stimulus at frequencies of 4–15 Hz in EEG. In addition, participants showed smaller P2 amplitudes in laser-evoked potentials (LEPs) when they were listening to music or white noise in comparison to sitting in silence. These findings suggest that a general modulation effect of sounds on pain, with a specific reduction of pain unpleasantness induced by the positive emotional impact. Conclusion: Music may serve as a real-time regulator to modulate pain unpleasantness. Results are discussed in view of current understandings of music-induced analgesia.