Metallic nanomaterials are widely used in micro/nanodevices. However, the mechanically driven microstructure evolution in these nanomaterials is not clearly understood, particularly when large stress and strain gradients are present. Here, we report the in situ bending experiment of Ni nanowires containing nanoscale twin lamellae using high-resolution transmission electron microscopy. We found that the large, localized bending deformation of Ni nanowires initially resulted in the formation of a low-angle tilt grain boundary (GB), consisting of randomly distributed dislocations in a diffuse GB layer. Further bending intensified the local plastic deformation and thus led to the severe distortion and collapse of local lattice domains in the GB region, thereby transforming a low-angle GB to a high-angle GB. Atomistic simulations, coupled with in situ atomic-scale imaging, unravelled the roles of bending-induced strain gradients and associated geometrically necessary dislocations in GB formation. These results offer a valuable understanding of the mechanically driven microstructure changes in metallic nanomaterials through GB formation. The work also has implications for refining the grains in bulk nanocrystalline materials.