In Drosophila elegans, partial sexual isolation has developed between the brown and black morphs, which are distributed allopatrically. The present study aims to understand how they discriminate between potential mates. Mating experiments show that the females of the two morphs differ in sexual signal(s) and the males discriminate using these differences. Body colouration is not used as a sexual cue in this species. Between the females of the two morphs, a large difference was observed in the percentages of 7-pentacosene and 9-pentacosene on the cuticle. Genetical analysis using recombinant inbred lines supported the possibility that the concentration of these pentacosenes plays a role in mate discrimination of these two morphs. However, males did not respond to killed females at all, suggesting that cuticular hydrocarbons of females are not the only cue for the induction of male courtship behaviour. It may be that unknown signals or substances are essential to induce male courtship and pentacosenes modulate the attractiveness of females, positively in the black morph and negatively in the brown morph. Drosophila elegans F1 offspring had intermediate characteristics in mate discrimination and hydrocarbon composition between the parental brown and black morph strains. The number of loci responsible for the differences in the concentration of pentacosenes and the male and female components in the mate recognition between these two morphs is suggested to be more than one.