Heat engines convert thermal energy into mechanical work and generally involve a large number of particles. We report the experimental realization of a single-atom heat engine. An ion is confined in a linear Paul trap with tapered geometry and driven thermally by coupling it alternately to hot and cold reservoirs. The output power of the engine is used to drive a harmonic oscillation. From direct measurements of the ion dynamics, we were able to determine the thermodynamic cycles for various temperature differences of the reservoirs. We then used these cycles to evaluate the power P and efficiency h of the engine, obtaining values up to P = 3.4 × 10–22 joules per second and h = 0.28%, consistent with analytical estimations. Our results demonstrate that thermal machines can be reduced to the limit of single atoms.