We investigate whether flux cancellation is responsible for the formation of a very massive filament resulting in the spectacular 2011 June 7 eruption. We analyse and quantify the amount of flux cancellation that occurs in NOAA AR 11226 and its two neighbouring ARs (11227 & 11233) using line-of-sight magnetograms from the Heliospheric Magnetic Imager. During a 3.6-day period building up to the filament eruption, 1.7 x 10^21 Mx, 21% of AR 11226s maximum magnetic flux, was cancelled along the polarity inversion line (PIL) where the filament formed. If the flux cancellation continued at the same rate up until the eruption then up to 2.8 x 10^21 Mx (34% of the AR flux) may have been built into the magnetic configuration that contains the filament plasma. The large flux cancellation rate is due to an unusual motion of the positive polarity sunspot, which splits, with the largest section moving rapidly towards the PIL. This motion compresses the negative polarity and leads to the formation of an orphan penumbra where one end of the filament is rooted. Dense plasma threads above the orphan penumbra build into the filament, extending its length, and presumably injecting material into it. We conclude that the exceptionally strong flux cancellation in AR 11226 played a significant role in the formation of its unusually massive filament. In addition, the presence and coherent evolution of bald patches in the vector magnetic field along the PIL suggests that the magnetic field configuration supporting the filament material is that of a flux rope.