Bed load transport and erosion in fine sediment beds are mainly driven by the dynamics of the near-bed turbulent flow. In situations when the shear stress is not sufficiently high to produce significant transport, the presence of an obstacle can initiate erosion and trigger the development of bed forms, which are produced by the emergence of the turbulent horseshoe vortex (THV) system. We develop a numerical model to investigate the initial stages of erosion and the development of ripples produced by the THV system in the vicinity of a surface-mounted cylindrical pier. The flow is simulated using the detached eddy simulation approach, which has been shown to accurately resolve most of the turbulent stresses produced by the THV. To compute the erosion, the Exner equation is coupled to a new bed load transport model that directly incorporates the effect of the instantaneous flow field on sediment transport. The morphodynamic model is integrated simultaneously with the flow equations using an arbitrary Lagrangian-Eulerian method for moving boundaries. Even though the time rate of scour is slower compared to the observations, the computed results exhibit essentially all the dynamics of erosion, including the emergence of ripples reported in the experiments of Dargahi (1990). The bed forms show similar velocities as reported in the experiments and are shown to be statistically similar to ripples measured in laboratory experiments and in nature. To our knowledge, this is the first three-dimensional simulation to capture the ripple dynamics that evolve naturally from the nonlinear interactions between the flow and the bed.