The ability of cytoskeletal motors to move unidirectionally along filamentous tracks is central to their role in cargo transport, motility and cell division. Kinesin and myosin motor families have a subclass that moves towards the opposite end of the microtubule or actin filament with respect to the rest of the motor family1,2, whereas all dynein motors that have been studied so far exclusively move towards the minus end of the microtubule3. Guided by cryo-electron microscopy and molecular dynamics simulations, we sought to understand the mechanism that underpins the directionality of dynein by engineering a Saccharomyces cerevisiae dynein that is directed towards the plus end of the microtubule. Here, using single-molecule assays, we show that elongation or shortening of the coiled-coil stalk that connects the motor to the microtubule controls the helical directionality of dynein around microtubules. By changing the length and angle of the stalk, we successfully reversed the motility towards the plus end of the microtubule. These modifications act by altering the direction in which the dynein linker swings relative to the microtubule, rather than by reversing the asymmetric unbinding of the motor from the microtubule. Because the length and angle of the dynein stalk are fully conserved among species, our findings provide an explanation for why all dyneins move towards the minus end of the microtubule.