Rotation-powered pulsars and magnetars are two different observational manifestations of neutron stars: rotation powered pulsars are rapidly spinning objects that are mostly observed as pulsating radio sources, while magnetars, neutron stars with the highest known magnetic fields, often emit short-duration X-ray bursts. Here we report simultaneous observations of the high-magnetic-field radio pulsar PSR J1119-6127 at X-ray, with XMM-Newton & NuSTAR, and at radio energies with Parkes radio telescope, during a period of magnetar-like bursts. The rotationally powered radio emission shuts off coincident with the occurrence of multiple X-ray bursts, and recovers on a time scale of ~70 seconds. These observations of related radio and X-ray phenomena further solidify the connection between radio pulsars and magnetars, and suggest that the pair plasma produced in bursts can disrupt the acceleration mechanism of radio emitting particles.