Colonization of a novel ecological niche can require, or be driven by, evolution of an animal’s behaviors promoting their reproductive success. We investigated the evolution and sensory basis of oviposition inDrosophila sechellia, a close relative ofDrosophila melanogasterthat exhibits extreme specialism forMorinda citrifolianoni fruit.D. sechelliaproduces fewer eggs than other drosophilids and lays these almost exclusively on noni substrates. We show that visual, textural and social cues do not explain this species-specific preference. By contrast, we find that loss of olfactory input inD. sechellia, but notD. melanogaster, essentially abolishes egg-laying, suggesting that olfaction gates gustatory-driven noni preference. Noni odors are detected by redundant olfactory pathways, but we discover a role for hexanoic acid and the cognate Ionotropic receptor 75b (Ir75b) in odor-evoked oviposition. Through receptor exchange inD. melanogaster, we provide evidence for a causal contribution of odor-tuning changes in Ir75b to the evolution ofD. sechellia’s oviposition behavior.