We present a measurement of the semileptonic mixing asymmetry for B0 mesons, a^d_{sl}, using two independent decay channels: B0 -> mu+D-X, with D- -> K+pi-pi-; and B0 -> mu+D*-X, with D*- -> antiD0 pi-, antiD0 -> K+pi- (and charge conjugate processes). We use a data sample corresponding to 10.4 fb^{-1} of ppbar collisions at sqrt(s) = 1.96 TeV, collected with the D0 experiment at the Fermilab Tevatron collider. We extract the charge asymmetries in these two channels as a function of the visible proper decay length (VPDL) of the B0 meson, correct for detector-related asymmetries using data-driven methods, and account for dilution from charge-symmetric processes using Monte Carlo simulation. The final measurement combines four signal VPDL regions for each channel, yielding a^d_{sl} = [0.68 \pm 0.45 \text{(stat.)} \pm 0.14 \text{(syst.)}]%. This is the single most precise measurement of this parameter, with uncertainties smaller than the current world average of B factory measurements.