Cytoplasmic dynein is a two-headed microtubule-based motor responsible for diverse intracellular movements, including minus-end-directed transport of organelles. The motility of cargo transporters is regulated according to the presence or absence of cargo; however, it remains unclear how cytoplasmic dynein achieves such regulation. Here, using a recombinant and native dynein complex in vitro, we show that lone, single dynein molecules are in an autoinhibited state, in which the two motor heads are stacked together. In this state, dynein moves diffusively along a microtubule with only a small bias towards the minus end of the microtubule. When the two heads were physically separated by a rigid rod, the movement of dynein molecules became directed and processive. Furthermore, assembly of multiple dynein molecules on a single cargo enabled them to move unidirectionally and generate force cooperatively. We thus propose a mechanism of autonomous on-off switching of cargo transport, in which single dynein molecules in the cell are autoinhibited through intramolecular head-head stacking and become active when they assemble as a team on a cargo.