Dislocations, one of the key entities in materials science, govern the properties of any crystalline material. Thus, understanding their life cycle, from creation to annihilation via motion and interaction with other dislocations, point defects and surfaces, is of fundamental importance. Unfortunately, atomic-scale investigations of dislocation evolution in a bulk object are well beyond the spatial and temporal resolution limits of current characterization techniques. Here we overcome the experimental limits by investigating the two-dimensional graphene in an aberration-corrected transmission electron microscope, exploiting the impinging energetic electrons both to image and stimulate atomic-scale morphological changes in the material. The resulting transformations are followed in situ, atom-by-atom, showing the full life cycle of a dislocation from birth to annihilation. Our experiments, combined with atomistic simulations, reveal the evolution of dislocations in two-dimensional systems to be governed by markedly long-ranging out-of-plane buckling.