Nuclear magnetic resonance (NMR) spectroscopy is a powerful technique for analysing the structure and function of molecules, and for performing three-dimensional imaging of their spin densities. At the heart of NMR spectrometers is the detection of electromagnetic radiation, in the form of a free induction decay signal1, generated by nuclei precessing around an applied magnetic field. Whereas conventional NMR requires signals from 1012 or more nuclei, recent advances in sensitive magnetometry2,3 have dramatically lowered the required number of nuclei to a level where a few or even individual nuclear spins can be detected4,5,6. It is unclear whether continuous detection of the free induction decay can still be applied at the single-spin level, or whether quantum back-action (the effect that a detector has on the measurement itself) modifies or suppresses the NMR response. Here we report the tracking of single nuclear spin precession using periodic weak measurements7,8,9. Our experimental system consists of nuclear spins in diamond that are weakly interacting with the electronic spin of a nearby nitrogen vacancy centre, acting as an optically readable meter qubit. We observe and minimize two important effects of quantum back-action: measurement-induced decoherence10 and frequency synchronization with the sampling clock11,12. We use periodic weak measurements to demonstrate sensitive, high-resolution NMR spectroscopy of multiple nuclear spins with a priori unknown frequencies. Our method may provide a useful route to single-molecule NMR13,14 at atomic resolution.