Each cargo in a cell employs a unique set of motor proteins for its transport. It is an open question why several types of motors are often bound to the same cargo. To dissect the roles of each type of motor in intracellular transport, we developed an optogenetic system to optogenetically inhibit kinesin-1, -2, -3, or dynein. This system allows us to control the activity of the endogenous set of motor proteins that are bound to intracellular cargoes. We examined the effect of optogenetic inhibition of kinesins-1, -2, and -3 and dynein on the transport of Rab5-positive early endosomes, Rab7-positive late endosomes, and lysotracker-positive lysosomes. In agreement with previous studies, sustained inhibition of either kinesins or dynein results in reduced motility in both directions. However, transient, optogenetic inhibition of kinesin-1 or dynein causes both early and late endosomes to move more processively by relieving competition with opposing motors. In contrast, optogenetic inhibition of kinesin-2 reduces the motility of late endosomes and lysosomes, and inhibition of kinesin-3 reduces the motility of early endosomes and lysosomes. These results suggest that the directionality of transport is controlled primarily through regulating kinesin-1 and dynein activity. On cargoes transported by several kinesin and dynein motors, motility can be directed by modulating the activity of a single type of motor on the cargo.