Feedback is one of the most powerful techniques for the control of classical systems. An extension into the quantum domain is desirable as it could allow the production of non-trivial quantum states1, 2, 3, 4 and protection against decoherence5, 6. The difficulties associated with quantum, as opposed to classical, feedback arise from the quantum measurement process—in particular the quantum projection noise and the limited measurement rate—as well as from quantum fluctuations perturbing the evolution in a driven open system. Here we demonstrate real-time feedback control7, 8, 9, 10, 11, 12 of the motion of a single atom trapped in an optical cavity. Individual probe photons carrying information about the atomic position13, 14 activate a dipole laser that steers the atom on timescales 70 times shorter than the atom’s oscillation period in the trap. Depending on the specific implementation, the trapping time is increased by a factor of more than four owing to feedback cooling, which can remove almost all the kinetic energy of the atom in a quarter of an oscillation period12. Our results show that the detected photon flux reflects the atomic motion, and thus mark a step towards the exploration of the quantum trajectory15, 16 of a single atom at the standard quantum limit.