Abstract Colonization of a novel ecological niche can require, or be driven by, evolution of an animal’s behaviors promoting their reproductive success in the new environment. Little is known about the underlying mechanisms. We have exploited an emerging genetic model for behavioral neuroecology, Drosophila sechellia – a close relative of Drosophila melanogaster that exhibits extreme specialism for Morinda citrifolia noni fruit – to study the evolution and sensory basis of oviposition. D. sechellia produces fewer eggs compared to other drosophilids, but lays these almost exclusively on noni substrates, contrasting with avoidance or indifference of noni by generalist species. Visual, textural and social cues do not explain the species-specificity of this preference. By contrast, loss of olfactory input in D. sechellia , but not D. melanogaster , essentially abolishes egg-laying, suggesting that this sensory modality gates gustatory-driven noni preference. We find the noni bouquet is detected by redundant olfactory pathways. By parsing the fruit’s volatile chemicals and genetic perturbation of individual olfactory pathways in D. sechellia , we discover a key role for hexanoic acid and its cognate receptor, the Ionotropic receptor Ir75b, in odor-evoked oviposition. Through receptor exchange in D. melanogaster , we provide evidence for a causal contribution of odor-tuning changes in Ir75b to the evolution of oviposition behavior during D. sechellia ’s host specialization.