Type I superluminous supernovae (SLSNe-I) are at least an order of magnitude brighter than standard SNe, with the power source for their luminosity still unknown1–3. The central engines of SLSNe-I are suggested to be magnetars4,5 but most of the SLSNe-I light curves have several bumps that are unexplained by the standard magnetar model6–8. Existing explanations for the bumps either modulate the engine luminosity or invoke interactions with circumstellar material (CSM). Surveys of the limited sample of SLSN-I light curves find no compelling evidence favouring either scenario7,9, leaving both the nature of the light-curve fluctuations and the applicability of the magnetar model unresolved. Here we report high-cadence multiband observations of a SLSN-I with clear ‘chirped’ (that is, decreasing period) light-curve bumps that can be directly linked to the properties of the magnetar central engine. Our observations are consistent with a magnetar centrally located within the expanding supernova ejecta, surrounded by an infalling accretion disk undergoing Lense–Thirring precession. Our analysis demonstrates that the light curve and bump frequency independently and self-consistently constrain the magnetar spin period to P = 4.2 ± 0.2 ms and the magnetic-field strength to B = (1.6 ± 0.1) × 1014 G. These results provide the first observational evidence of the Lense–Thirring effect in the environment of a magnetar and confirm the magnetar spin-down model as an explanation for the extreme luminosity observed in SLSNe-I. We anticipate that this discovery will create avenues for testing general relativity in a new regime—the violent centres of young SNe.