Propelling single molecules in a controlled manner along an unmodified surface remains extremely challenging because it requires molecules that can use light, chemical or electrical energy to modulate their interaction with the surface in a way that generates motion. Nature's motor proteins have mastered the art of converting conformational changes into directed motion, and have inspired the design of artificial systems such as DNA walkers and light- and redox-driven molecular motors. But although controlled movement of single molecules along a surface has been reported, the molecules in these examples act as passive elements that either diffuse along a preferential direction with equal probability for forward and backward movement or are dragged by an STM tip. Here we present a molecule with four functional units--our previously reported rotary motors--that undergo continuous and defined conformational changes upon sequential electronic and vibrational excitation. Scanning tunnelling microscopy confirms that activation of the conformational changes of the rotors through inelastic electron tunnelling propels the molecule unidirectionally across a Cu(111) surface. The system can be adapted to follow either linear or random surface trajectories or to remain stationary, by tuning the chirality of the individual motor units. Our design provides a starting point for the exploration of more sophisticated molecular mechanical systems with directionally controlled motion.