  We discuss the mass modifications of $\bar{\mathrm{D}}$ and
$\bar{\mathrm{D}}^{\ast}$ ($\mathrm{B}$ and $\mathrm{B}^{\ast}$) mesons in
nuclear medium. The heavy quark symmetry for $\bar{\mathrm{D}}$ and
$\bar{\mathrm{D}}^{\ast}$ ($\mathrm{B}$ and $\mathrm{B}^{\ast}$) mesons is
adopted, and the interaction between a $\bar{\mathrm{D}}$ or
$\bar{\mathrm{D}}^{\ast}$ ($\mathrm{B}$ or $\mathrm{B}^{\ast}$) meson and a
nucleon is supplied from the pion exchange. We find the negative mass shifts
for $\bar{\mathrm{D}}$ meson and $\mathrm{B}$ meson, and hence that the
$\bar{\mathrm{D}}$ and $\mathrm{B}$ mesons are bound in the nuclear medium. As
applications, we consider the atomic nuclei with a $\bar{\mathrm{D}}$ meson,
$^{40}_{\bar{\mathrm{D}}}\mathrm{Ca}$ and
$^{208}_{\bar{\mathrm{D}}}\mathrm{Pb}$, and investigate the energy levels of
the $\bar{\mathrm{D}}$ meson in each nucleus. We also discuss the mass shifts
in the isospin asymmetric nuclear medium, and present the possible phenomenon
about distribution of isospin density around a $\bar{\mathrm{D}}$ or
$\mathrm{B}$ meson in nuclear medium. We find that the mass shifts of
$\bar{\mathrm{D}}^{\ast}$ and $\mathrm{B}^{\ast}$ mesons have large imaginary
parts, which would prevent precise study of the energy levels of
$\bar{\mathrm{D}}^{\ast}$ and $\mathrm{B}^{\ast}$ mesons in nuclei.
