Background Chemotaxis, the ability to direct movements according to chemical cues in the environment, is important for the survival of most organisms. The vinegar fly, Drosophila melanogaster, displays robust olfactory aversion and attraction, but how these behaviors are executed via changes in locomotion remains poorly understood. In particular, it is not clear whether aversion and attraction bidirectionally modulate a shared circuit or recruit distinct circuits for execution. Results Using a quantitative behavioral assay, we determined that both aversive and attractive odorants modulate the initiation and direction of turns but display distinct kinematics. Using genetic tools to perturb these behaviors, we identified specific populations of neurons required for aversion, but not for attraction. Inactivation of these populations of cells affected the completion of aversive turns, but not their initiation. Optogenetic activation of the same populations of cells triggered a locomotion pattern resembling aversive turns. Perturbations in both the ellipsoid body and the ventral nerve cord, two regions involved in motor control, resulted in defects in aversion. Conclusions Aversive chemotaxis in vinegar flies triggers ethologically appropriate kinematics distinct from those of attractive chemotaxis and requires specific motor-related neurons.