Antarctica's Getz Ice Shelf has been rapidly thinning in recent years, producing more meltwater than any other ice shelf in the world. The influx of fresh water is known to substantially influence ocean circulation and biological productivity, but relatively little is known about the factors controlling basal melt rate or how basal melt is spatially distributed beneath the ice shelf. Also unknown is the relative importance of subglacial discharge from the grounded ice sheet in contributing to the export of fresh water from the ice shelf cavity. Here we compare the observed spatial distribution of basal melt rate to a new sub-ice-shelf bathymetry map inferred from airborne gravity surveys and to locations of subglacial discharge from the grounded ice sheet. We find that melt rates are high where bathymetric troughs provide a pathway for warm Circumpolar Deep Water to enter the ice shelf cavity and that melting is enhanced where subglacial discharge fresh water flows across the grounding line. This is the first study to address the relative importance of meltwater production of the Getz Ice Shelf from both ocean and subglacial sources.