Developing molecular systems with functions analogous to those of macroscopic machine components, such as rotors, gyroscopes and valves, is a long-standing goal of nanotechnology. However, macroscopic analogies go only so far in predicting function in nanoscale environments, where friction dominates over inertia. In some instances, ratchet mechanisms have been used to bias the ever-present random, thermally driven (Brownian) motion and drive molecular diffusion in desired directions. Here, we visualize the motions of surface-bound molecular rotors using defocused fluorescence imaging, and observe the transition from hindered to free Brownian rotation by tuning medium viscosity. We show that the otherwise random rotations can be biased by the polarization of the excitation light field, even though the associated optical torque is insufficient to overcome thermal fluctuations. The biased rotation is attributed instead to a fluctuating-friction mechanism in which photoexcitation of the rotor strongly inhibits its diffusion rate.