The flexible-boundary (FB) quantum mechanical/molecular mechanical (QM/MM) scheme accounts for partial charge transfer between the QM and MM subsystems. Previous calculations have demonstrated excellent performance of FB-QM/MM in geometry optimizations. This article reports an implementation to extend FB-QM/MM to molecular dynamics simulations. To prevent atoms from getting unreasonably close, which can lead to polarization catastrophe, empirical correcting functions are introduced to provide additive penalty energies for the involved atom pairs and to improve the descriptions of the repulsive exchange forces in FB-QM/MM calculations. Test calculations are carried out for chloride, lithium, sodium, and ammonium ions solvated in water. Comparisons with conventional QM/MM calculations suggest that the FB treatment provides reasonably good results for the charge distributions of the atoms in the QM subsystems and for the solvation shell structural properties, albeit smaller QM subsystems have been used in the FB-QM/MM dynamics simulations.