  We analyse the non-perturbative superpotential due to M5-brane instantons in
F-theory compactifications on Calabi-Yau fourfolds. The M5 partition function
is obtained via holomorphic factorisation by explicitly performing the sum over
chiral 3-form fluxes. Comparison with the partition function of fluxed
Euclidean D3-brane instantons in Type IIB orientifolds allows us to fix the
spin structure on the intermediate Jacobian of the M5-instanton. We furthermore
analyse the contribution of the M5-instanton to the superpotential in the
presence of G4 gauge flux, where the superpotential is dressed with matter
fields. We explicitly evaluate the pullback of G4 onto the M5-brane as a
measure for the presence of charged instanton zero modes. This accounts for the
M5 charge both under massless U(1)s, if present, and under what corresponds in
Type II language to geometrically massive U(1)s.
