Magnetars are highly magnetized young neutron stars that occasionally produce enormous bursts and flares of X-rays and γ-rays1. Of the approximately thirty magnetars currently known in our Galaxy and the Magellanic Clouds, five have exhibited transient radio pulsations2,3. Fast radio bursts (FRBs) are millisecond-duration bursts of radio waves arriving from cosmological distances4, some of which have been seen to repeat5-8. A leading model for repeating FRBs is that they are extragalactic magnetars, powered by their intense magnetic fields9-11. However, a challenge to this model is that FRBs must have radio luminosities many orders of magnitude larger than those seen from known Galactic magnetars. Here we report the detection of an extremely intense radio burst from the Galactic magnetar SGR 1935+2154 using the Canadian Hydrogen Intensity Mapping Experiment (CHIME) FRB project. The fluence of this two-component bright radio burst and the estimated distance to SGR 1935+2154 together imply a burst energy at 400 to 800 megahertz of approximately 3 × 1034 erg, which is three orders of magnitude higher than the burst energy of any radio-emitting magnetar detected thus far. Such a burst coming from a nearby galaxy (at a distance of less than approximately 12 megaparsecs) would be indistinguishable from a typical FRB. However, given the large gaps in observed energies and activity between the brightest and most active FRB sources and what is observed for SGR 1935+2154-like magnetars, more energetic and active sources-perhaps younger magnetars-are needed to explain all observations.