  We study the effect of large baryonic isocurvature perturbations on the
abundance of deuterium (D) synthesized in big bang nucleosynthesis (BBN). We
found that large baryonic isocurvature perturbations existing at the BBN epoch
($T\sim 0.1\,$MeV) change the D abundance by the second order effect, which,
together with the recent precise D measurement, leads to a constraint on the
amplitude of the power spectrum of the baryon isocurvature perturbations. The
obtained constraint on the amplitude is $\lesssim 0.016 \,(2\sigma)$ for scale
$k^{-1} \gtrsim 0.0025\,\text{pc}$. This gives the most stringent one for
$0.1\,\text{Mpc}^{-1} \lesssim k \lesssim 4\times 10^8\, \text{Mpc}^{-1}$. We
apply the BBN constraint to the relaxation leptogenesis scenario, where large
baryon isocurvature perturbations are produced in the last $N_\text{last}$
$e$-fold of inflation, and we obtain a constraint on $N_\text{last}$.
