  The $\mathscr{N}=2^*$ supersymmetric gauge theory is a massive deformation of
$\mathscr{N}=4$, in which the adjoint hypermultiplet gets a mass. We present a
D-brane realisation of the (non-)Abelian $\mathscr{N}=2^*$ theory, and compute
suitable topological amplitudes, which are expressed as a double series
expansion. The coefficients determine couplings of higher-dimensional operators
in the effective supergravity action that involve powers of the anti-self-dual
$\mathscr{N}=2$ chiral Weyl superfield and of self-dual gauge field strengths
superpartners of the D5-brane coupling modulus. In the field theory limit, the
result reproduces the Nekrasov partition function in the two-parameter
$\varOmega$-background, in agreement with a recent proposal.
