We have developed an accelerated molecular dynamics (MD) method to model atomic-scale rare events. In this method, a smooth histogram of collective variables is first estimated by canonical ensemble molecular dynamics calculations, and then a temperature-dependent boost potential is iteratively constructed to accelerate the MD simulation. This method not only allows us to observe the rare events but also to evaluate the profile of free energy and trial frequency along the reaction coordinate. We employed this method to study carbon diffusion in BCC iron and evaluated carbon's temperature-dependent diffusivity. The obtained diffusivities agree well with the experimental measurements. Even at low temperature for which no experimental data are available, the diffusivity can be evaluated accurately. Additionally, we study carbon diffusion inside edge dislocation core in BCC iron, and demonstrate the applicability of the method to rare events on a rugged free energy surface.