Earth's nearest candidate supermassive black hole lies at the centre of the Milky Way. Its electromagnetic emission is thought to be powered by radiatively inefficient accretion of gas from its environment, which is a standard mode of energy supply for most galactic nuclei. X-ray measurements have already resolved a tenuous hot gas component from which the black hole can be fed. The magnetization of the gas, however, which is a crucial parameter determining the structure of the accretion flow, remains unknown. Strong magnetic fields can influence the dynamics of accretion, remove angular momentum from the infalling gas, expel matter through relativistic jets and lead to synchrotron emission such as that previously observed. Here we report multi-frequency radio measurements of a newly discovered pulsar close to the Galactic Centre and show that the pulsar's unusually large Faraday rotation (the rotation of the plane of polarization of the emission in the presence of an external magnetic field) indicates that there is a dynamically important magnetic field near the black hole. If this field is accreted down to the event horizon it provides enough magnetic flux to explain the observed emission--from radio to X-ray wavelengths--from the black hole.