Although chemists have made small-molecule rotary motors, to date there have been no reports of small-molecule linear motors. Here we describe the synthesis and operation of a 21-atom two-legged molecular unit that is able to walk up and down a four-foothold molecular track. High processivity is conferred by designing the track-binding interactions of the two feet to be labile under different sets of conditions such that each foot can act as a temporarily fixed pivot for the other. The walker randomly and processively takes zero or one step along the track using a 'passing-leg' gait each time the environment is switched between acid and base. Replacing the basic step with a redox-mediated, disulfide-exchange reaction directionally transports the bipedal molecules away from the minimum-energy distribution by a Brownian ratchet mechanism. The ultimate goal of such studies is to produce artificial, linear molecular motors that move directionally along polymeric tracks to transport cargoes and perform tasks in a manner reminiscent of biological motor proteins.