We performed molecular dynamics simulations of granular beds driven by a model hydrodynamic shear flow to elucidate general grain-scale mechanisms that determine the onset and cessation of sediment transport. By varying the Shields number (the nondimensional shear stress at the top of the bed) and particle Reynolds number (the ratio of particle inertia to viscous damping), we explore how variations of the fluid flow rate, particle inertia, and fluid viscosity affect the onset and cessation of bed motion. For low to moderate particle Reynolds numbers, a critical boundary separates mobile and static states. Transition times between these states diverge as this boundary is approached both from above and below. At high particle Reynolds number, inertial effects become dominant, and particle motion can be sustained well below flow rates at which mobilization of a static bed occurs. We also find that the onset of bed motion (for both low and high particle Reynolds numbers) is described by Weibullian weakest-link statistics and thus is crucially dependent on the packing structure of the granular bed, even deep beneath the surface.