When intense lightwaves accelerate electrons through a solid, the emerging high-order harmonic (HH) radiation offers key insights into the material. Sub-optical-cycle dynamics—such as dynamical Bloch oscillations, quasiparticle collisions, valley pseudospin switching and heating of Dirac gases—leave fingerprints in the HH spectra of conventional solids. Topologically non-trivial matter with invariants that are robust against imperfections has been predicted to support unconventional HH generation. Here we experimentally demonstrate HH generation in a three-dimensional topological insulator—bismuth telluride. The frequency of the terahertz driving field sharply discriminates between HH generation from the bulk and from the topological surface, where the unique combination of long scattering times owing to spin–momentum locking and the quasi-relativistic dispersion enables unusually efficient HH generation. Intriguingly, all observed orders can be continuously shifted to arbitrary non-integer multiples of the driving frequency by varying the carrier-envelope phase of the driving field—in line with quantum theory. The anomalous Berry curvature warranted by the non-trivial topology enforces meandering ballistic trajectories of the Dirac fermions, causing a hallmark polarization pattern of the HH emission. Our study provides a platform to explore topology and relativistic quantum physics in strong-field control, and could lead to non-dissipative topological electronics at infrared frequencies.