Music has been found to be an effective aid in foreign language learning, but its potential use has yet to be explored. This study utilised a quantitative research method to examine the effect of music type on generating English-as-a-foreign-language (EFL) students’ pre-writing ideas, which were moderated by gender. Fifty-three students from three classes without academic writing experiences were assigned to three different music types, including no music, instrumental music, and pop music. The results showed that female students outperformed male students, regardless of music types, in pre-writing idea generation tasks. In particular, female students significantly performed the best in instrumental music, followed by no music and pop music. On the contrary, male students obtained the greatest achievement in task when listening to pop music and the lowest performance when listening to instrumental music. The findings of the study imply the recognition of gender-specific preferences in using different types of music to enhance the processes of pre-writing idea generation, prompting tailored writing environments for EFL students’ needs.