Nematodes use an extensive chemical language based on glycosides of the dideoxysugar ascarylose for developmental regulation (dauer formation), male sex attraction, aggregation, and dispersal. However, no examples of a female- or hermaphrodite-specific sex attractant have been identified to date. In this study, we investigated the pheromone system of the gonochoristic sour paste nematode Panagrellus redivivus, which produces sex-specific attractants of the opposite sex. Activity-guided fractionation of the P. redivivus exometabolome revealed that males are strongly attracted to ascr#1 (also known as daumone), an ascaroside previously identified from Caenorhabditis elegans hermaphrodites. Female P. redivivus are repelled by high concentrations of ascr#1 but are specifically attracted to a previously unknown ascaroside that we named dhas#18, a dihydroxy derivative of the known ascr#18 and an ascaroside that features extensive functionalization of the lipid-derived side chain. Targeted profiling of the P. redivivus exometabolome revealed several additional ascarosides that did not induce strong chemotaxis. We show that P. redivivus females, but not males, produce the male-attracting ascr#1, whereas males, but not females, produce the female-attracting dhas#18. These results show that ascaroside biosynthesis in P. redivivus is highly sex-specific. Furthermore, the extensive side chain functionalization in dhas#18, which is reminiscent of polyketide-derived natural products, indicates unanticipated biosynthetic capabilities in nematodes.