© 2018, The Author(s), under exclusive licence to Springer Nature Limited. Hydrogen-poor superluminous supernovae (SLSN-I) are a class of rare and energetic explosions that have been discovered in untargeted transient surveys in the past decade1,2. The progenitor stars and the physical mechanism behind their large radiated energies (about 1051 erg or 1044 J) are both debated, with one class of models primarily requiring a large rotational energy3,4 and the other requiring very massive progenitors that either convert kinetic energy into radiation through interaction with circumstellar material (CSM)5–8 or engender an explosion caused by pair-instability (loss of photon pressure due to particle–antiparticle production)9,10. Observing the structure of the CSM around SLSN-I offers a powerful test of some scenarios, although direct observations are scarce11,12. Here, we present a series of spectroscopic observations of the SLSN-I iPTF16eh, which reveal both absorption and time- and frequency-variable emission in the Mg ii resonance doublet. We show that these observations are naturally explained as a resonance scattering light echo from a circumstellar shell. Modelling the evolution of the emission, we infer a shell radius of 0.1 pc and velocity of 3,300 km s−1, implying that the shell was ejected three decades before the supernova explosion. These properties match theoretical predictions of shell ejections occurring because of pulsational pair-instability and imply that the progenitor had a helium core mass of about 50–55 M⊙, corresponding to an initial mass of about 115 M⊙.